aframe-vartiste-toolkit
Version:
Toolkit to create GUI similar to VARTISTE
2 lines • 2.57 MB
JavaScript
/*! For license information please see vartiste-toolkit.js.LICENSE.txt */
(()=>{var e,t,a,i,r={215:(e,t,a)=>{a(5072);const{devDependencies:i}=a(6897);e.exports={corePath:`https://unpkg.com/@flemist/ffmpeg.wasm-core-st@${i["@flemist/ffmpeg.wasm-core-st"].substring(1)}/dist/ffmpeg-core.js`}},2795:(e,t,a)=>{const i=a(5072);e.exports=async e=>{let t=e;if(void 0===e)return new Uint8Array;if("string"==typeof e)if(/data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(e))t=atob(e.split(",")[1]).split("").map((e=>e.charCodeAt(0)));else{const a=await fetch(i(e));t=await a.arrayBuffer()}else(e instanceof File||e instanceof Blob)&&(t=await(a=e,new Promise(((e,t)=>{const i=new FileReader;i.onload=()=>{e(i.result)},i.onerror=({target:{error:{code:e}}})=>{t(Error(`File could not be read! Code=${e}`))},i.readAsArrayBuffer(a)}))));var a;return new Uint8Array(t)}},6654:(e,t,a)=>{const i=a(5072),{log:r}=a(3410),{CREATE_FFMPEG_CORE_IS_NOT_DEFINED:n}=a(6890),o=async(e,t)=>{r("info",`fetch ${e}`);const a=await(await fetch(e)).arrayBuffer();r("info",`${e} file size = ${a.byteLength} bytes`);const i=new Blob([a],{type:t}),n=URL.createObjectURL(i);return r("info",`${e} blob URL = ${n}`),n};e.exports=async({corePath:e})=>{if("string"!=typeof e)throw Error("corePath should be a string!");const t=i(e),a=await o(t,"application/javascript"),s=await o(t.replace("ffmpeg-core.js","ffmpeg-core.wasm"),"application/wasm"),c=await o(t.replace("ffmpeg-core.js","ffmpeg-core.worker.js"),"application/javascript");return"undefined"==typeof createFFmpegCore?new Promise((e=>{const i=document.createElement("script"),o=()=>{if(i.removeEventListener("load",o),"undefined"==typeof createFFmpegCore)throw Error(n(t));r("info","ffmpeg-core.js script loaded"),e({createFFmpegCore,corePath:a,wasmPath:s,workerPath:c})};i.src=a,i.type="text/javascript",i.addEventListener("load",o),document.getElementsByTagName("head")[0].appendChild(i)})):(r("info","ffmpeg-core.js script is loaded already"),Promise.resolve({createFFmpegCore,corePath:a,wasmPath:s,workerPath:c}))}},9908:(e,t,a)=>{const i=a(215),r=a(6654),n=a(2795);e.exports={defaultOptions:i,getCreateFFmpegCore:r,fetchFile:n}},3854:e=>{e.exports={defaultArgs:["./ffmpeg","-nostdin","-y"],baseOptions:{log:!1,logger:()=>{},progress:()=>{},corePath:""}}},1642:(e,t,a)=>{const{defaultArgs:i,baseOptions:r}=a(3854),{setLogging:n,setCustomLogger:o,log:s}=a(3410),c=a(2465),l=a(5221),{defaultOptions:d,getCreateFFmpegCore:f}=a(9908),{version:h}=a(6897),u=Error("ffmpeg.wasm is not ready, make sure you have completed load().");e.exports=(e={})=>{const{log:t,logger:a,progress:b,...p}={...r,...d,...e};let g=null,m=null,H=null,y=!1,k=b;const v=({type:e,message:t})=>{s(e,t),c(t,k),(e=>{"FFMPEG_END"===e&&null!==H&&(H(),H=null,y=!1)})(t)};return n(t),o(a),s("info",`use ffmpeg.wasm v${h}`),{setProgress:e=>{k=e},setLogger:e=>{o(e)},setLogging:n,load:async()=>{if(s("info","load ffmpeg-core"),null!==g)throw Error("ffmpeg.wasm was loaded, you should not load it again, use ffmpeg.isLoaded() to check next time.");{s("info","loading ffmpeg-core");const{createFFmpegCore:e,corePath:t,workerPath:a,wasmPath:i}=await f(p);g=await e({noExitRuntime:!0,mainScriptUrlOrBlob:t,printErr:e=>v({type:"fferr",message:e}),print:e=>v({type:"ffout",message:e}),locateFile:(e,t)=>{if("undefined"!=typeof window){if(void 0!==i&&e.endsWith("ffmpeg-core.wasm"))return i;if(void 0!==a&&e.endsWith("ffmpeg-core.worker.js"))return a}return t+e}}),m=g.cwrap("main","number",["number","number"]),s("info","ffmpeg-core loaded")}},isLoaded:()=>null!==g,run:(...e)=>{if(s("info",`run ffmpeg command: ${e.join(" ")}`),null===g)throw u;if(y)throw Error("ffmpeg.wasm can only run one command at a time");return y=!0,new Promise((t=>{const a=[...i,...e].filter((e=>0!==e.length));H=t,m(...l(g,a))}))},exit:()=>{if(null===g)throw u;y=!1,g.exit(1),g=null,m=null,H=null},FS:(e,...t)=>{if(s("info",`run FS.${e} ${t.map((e=>"string"==typeof e?e:`<${e.length} bytes binary file>`)).join(" ")}`),null===g)throw u;{let a=null;try{a=g.FS[e](...t)}catch(a){throw"readdir"===e?Error(`ffmpeg.FS('readdir', '${t[0]}') error. Check if the path exists, ex: ffmpeg.FS('readdir', '/')`):"readFile"===e?Error(`ffmpeg.FS('readFile', '${t[0]}') error. Check if the path exists`):Error("Oops, something went wrong in FS operation.")}return a}}}}},7139:(e,t,a)=>{a(5666);const i=a(1642),{fetchFile:r}=a(9908);e.exports={createFFmpeg:i,fetchFile:r}},6890:e=>{e.exports={CREATE_FFMPEG_CORE_IS_NOT_DEFINED:e=>`\ncreateFFmpegCore is not defined. ffmpeg.wasm is unable to find createFFmpegCore after loading ffmpeg-core.js from ${e}. Use another URL when calling createFFmpeg():\n\nconst ffmpeg = createFFmpeg({\n corePath: 'http://localhost:3000/ffmpeg-core.js',\n});\n`}},3410:e=>{let t=!1,a=()=>{};e.exports={logging:t,setLogging:e=>{t=e},setCustomLogger:e=>{a=e},log:(e,i)=>{a({type:e,message:i}),t&&console.log(`[${e}] ${i}`)}}},5221:e=>{e.exports=(e,t)=>{const a=e._malloc(t.length*Uint32Array.BYTES_PER_ELEMENT);return t.forEach(((t,i)=>{const r=e._malloc(t.length+1);e.writeAsciiToMemory(t,r),e.setValue(a+Uint32Array.BYTES_PER_ELEMENT*i,r,"i32")})),[t.length,a]}},2465:e=>{let t=0,a=0;const i=e=>{const[t,a,i]=e.split(":");return 60*parseFloat(t)*60+60*parseFloat(a)+parseFloat(i)};e.exports=(e,r)=>{if("string"==typeof e)if(e.startsWith(" Duration")){const n=e.split(", ")[0].split(": ")[1],o=i(n);r({duration:o,ratio:a}),(0===t||t>o)&&(t=o)}else if(e.startsWith("frame")||e.startsWith("size")){const n=e.split("time=")[1].split(" ")[0],o=i(n);a=o/t,r({ratio:a,time:o})}else e.startsWith("video:")&&(r({ratio:1}),t=0)}},4265:()=>{!function(e,t){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var r=i(e),n=a(t);function o(){var e,t=0,a=[],i=0,r=0;var n=u((function(e){r||c(1,e)})),s=u((function(e){r||c(-1,e)}));function c(a,i){r++;var n=0;try{i===g&&b();var o=a>0&&h(i);o?o.call(i,u((function(e){n++,c(1,e)})),u((function(e){n++,c(-1,e)}))):(t=a,e=i,l())}catch(e){t||n||c(-1,e)}}function l(){i||(setTimeout(d,0),i=1)}function d(){var e=a;i=0,a=[],e.forEach(f)}function f(e){e()}function h(e){var t=e&&(p(e)||"object"==typeof e)&&e.then;return p(t)&&t}function u(e){var t=0;return function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];t++||e.apply(this,a)}}function b(){throw new TypeError("Chaining cycle detected")}var p=function(e){return"function"==typeof e},g={then:function(i,r){var n=o();return a.push((function(){var a=t>0?i:r;if(p(a))try{var o=a(e);o===n&&b();var s=h(o);s?s.call(o,n.resolve,n.reject):n.resolve(o)}catch(e){n.reject(e)}else n[t>0?"resolve":"reject"](e)})),t&&l(),n},resolve:n,reject:s};return g}function s(){var e,t,a=new Promise((function(a,i){e=a,t=i}));return{then:a.then.bind(a),resolve:e,reject:t}}o.all=s.all=function(e){var t=0,a=[],i=c();return 0===e.length?i.resolve([]):e.forEach((function(r,n){var o=c();o.resolve(r),o.then((function(r){t++,a[n]=r,t===e.length&&i.resolve(a)}),i.reject)})),i};var c="function"==typeof Promise?s:o;function l(){var e=Object.create(null);function t(i,r){var n=i.id,o=i.name,s=i.dependencies;void 0===s&&(s=[]);var c=i.init;void 0===c&&(c=function(){});var l=i.getTransferables;if(void 0===l&&(l=null),!e[n])try{s=s.map((function(a){return a&&a.isWorkerModule&&(t(a,(function(e){if(e instanceof Error)throw e})),a=e[a.id].value),a})),c=a("<"+o+">.init",c),l&&(l=a("<"+o+">.getTransferables",l));var d=null;"function"==typeof c?d=c.apply(void 0,s):console.error("worker module init function failed to rehydrate"),e[n]={id:n,value:d,getTransferables:l},r(d)}catch(e){e&&e.noLog||console.error(e),r(e)}}function a(e,t){var a=void 0;self.troikaDefine=function(e){return a=e};var i=URL.createObjectURL(new Blob(["/** "+e.replace(/\*/g,"")+" **/\n\ntroikaDefine(\n"+t+"\n)"],{type:"application/javascript"}));try{importScripts(i)}catch(e){console.error(e)}return URL.revokeObjectURL(i),delete self.troikaDefine,a}self.addEventListener("message",(function(a){var i=a.data,r=i.messageId,n=i.action,o=i.data;try{"registerModule"===n&&t(o,(function(e){e instanceof Error?postMessage({messageId:r,success:!1,error:e.message}):postMessage({messageId:r,success:!0,result:{isCallable:"function"==typeof e}})})),"callModule"===n&&function(t,a){var i,r=t.id,n=t.args;e[r]&&"function"==typeof e[r].value||a(new Error("Worker module "+r+": not found or its 'init' did not return a function"));try{var o=(i=e[r]).value.apply(i,n);o&&"function"==typeof o.then?o.then(s,(function(e){return a(e instanceof Error?e:new Error(""+e))})):s(o)}catch(e){a(e)}function s(t){try{var i=e[r].getTransferables&&e[r].getTransferables(t);i&&Array.isArray(i)&&i.length||(i=void 0),a(t,i)}catch(e){console.error(e),a(e)}}}(o,(function(e,t){e instanceof Error?postMessage({messageId:r,success:!1,error:e.message}):postMessage({messageId:r,success:!0,result:e},t||void 0)}))}catch(e){postMessage({messageId:r,success:!1,error:e.stack})}}))}var d=function(){var e=!1;if("undefined"!=typeof window&&void 0!==window.document)try{new Worker(URL.createObjectURL(new Blob([""],{type:"application/javascript"}))).terminate(),e=!0}catch(e){console.log("Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: ["+e.message+"]")}return d=function(){return e},e},f=0,h=0,u=!1,b=Object.create(null),p=function(){var e=Object.create(null);return e._count=0,e}();function g(e){if(!(e&&"function"==typeof e.init||u))throw new Error("requires `options.init` function");var t=e.dependencies,a=e.init,i=e.getTransferables,r=e.workerId;if(!d())return function(e){var t=function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return t._getInitResult().then((function(t){if("function"==typeof t)return t.apply(void 0,e);throw new Error("Worker module function was called but `init` did not return a callable function")}))};return t._getInitResult=function(){var a=e.dependencies,i=e.init;a=Array.isArray(a)?a.map((function(e){return e&&e._getInitResult?e._getInitResult():e})):[];var r=c.all(a).then((function(e){return i.apply(null,e)}));return t._getInitResult=function(){return r},r},t}(e);null==r&&(r="#default");var n="workerModule"+ ++f,o=e.name||n,s=null;function l(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s||(s=H(r,"registerModule",l.workerModuleData)),s.then((function(t){if(t.isCallable)return H(r,"callModule",{id:n,args:e});throw new Error("Worker module function was called but `init` did not return a callable function")}))}return t=t&&t.map((function(e){return"function"!=typeof e||e.workerModuleData||(u=!0,e=g({workerId:r,name:"<"+o+"> function dependency: "+e.name,init:"function(){return (\n"+m(e)+"\n)}"}),u=!1),e&&e.workerModuleData&&(e=e.workerModuleData),e})),l.workerModuleData={isWorkerModule:!0,id:n,name:o,dependencies:t,init:m(a),getTransferables:i&&m(i)},l}function m(e){var t=e.toString();return!/^function/.test(t)&&/^\w+\s*\(/.test(t)&&(t="function "+t),t}function H(e,t,a){var i=c(),r=++h;return p[r]=function(e){e.success?i.resolve(e.result):i.reject(new Error("Error in worker "+t+" call: "+e.error))},p._count++,p._count>1e3&&console.warn("Large number of open WorkerModule requests, some may not be returning"),function(e){var t=b[e];if(!t){var a=m(l);(t=b[e]=new Worker(URL.createObjectURL(new Blob(["/** Worker Module Bootstrap: "+e.replace(/\*/g,"")+" **/\n\n;("+a+")()"],{type:"application/javascript"})))).onmessage=function(e){var t=e.data,a=t.messageId,i=p[a];if(!i)throw new Error("WorkerModule response with empty or unknown messageId");delete p[a],p._count--,i(t)}}return t}(e).postMessage({messageId:r,action:t,data:a}),i}var y=g({name:"Thenable",dependencies:[c],init:function(e){return e}});const k=/\bvoid\s+main\s*\(\s*\)\s*{/g;function v(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,(function(t,a){let i=e.ShaderChunk[a];return i?v(i):t}))}const w=[];for(let e=0;e<256;e++)w[e]=(e<16?"0":"")+e.toString(16);const _=Object.assign||function(){let e=arguments[0];for(let t=1,a=arguments.length;t<a;t++){let a=arguments[t];if(a)for(let t in a)a.hasOwnProperty(t)&&(e[t]=a[t])}return e},A=Date.now(),x=new WeakMap,E=new Map;let j=1e10;function T(t,a){const i=function(e){const t=JSON.stringify(e,F);let a=I.get(t);null==a&&I.set(t,a=++C);return a}(a);let r=x.get(t);if(r||x.set(t,r=Object.create(null)),r[i])return new r[i];const n=`_onBeforeCompile${i}`,o=function(e){t.onBeforeCompile.call(this,e);const r=i+"|||"+e.vertexShader+"|||"+e.fragmentShader;let o=E[r];if(!o){const t=function({vertexShader:e,fragmentShader:t},a,i){let{vertexDefs:r,vertexMainIntro:n,vertexMainOutro:o,vertexTransform:s,fragmentDefs:c,fragmentMainIntro:l,fragmentMainOutro:d,fragmentColorTransform:f,customRewriter:h,timeUniform:u}=a;r=r||"",n=n||"",o=o||"",c=c||"",l=l||"",d=d||"",(s||h)&&(e=v(e));(f||h)&&(t=v(t=t.replace(/^[ \t]*#include <((?:tonemapping|encodings|fog|premultiplied_alpha|dithering)_fragment)>/gm,"\n//!BEGIN_POST_CHUNK $1\n$&\n//!END_POST_CHUNK\n")));if(h){let a=h({vertexShader:e,fragmentShader:t});e=a.vertexShader,t=a.fragmentShader}if(f){let e=[];t=t.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm,(t=>(e.push(t),""))),d=`${f}\n${e.join("\n")}\n${d}`}if(u){const e=`\nuniform float ${u};\n`;r=e+r,c=e+c}s&&(r=`${r}\nvoid troikaVertexTransform${i}(inout vec3 position, inout vec3 normal, inout vec2 uv) {\n ${s}\n}\n`,n=`\ntroika_position_${i} = vec3(position);\ntroika_normal_${i} = vec3(normal);\ntroika_uv_${i} = vec2(uv);\ntroikaVertexTransform${i}(troika_position_${i}, troika_normal_${i}, troika_uv_${i});\n${n}\n`,e=(e=`vec3 troika_position_${i};\nvec3 troika_normal_${i};\nvec2 troika_uv_${i};\n${e}\n`).replace(/\b(position|normal|uv)\b/g,((e,t,a,r)=>/\battribute\s+vec[23]\s+$/.test(r.substr(0,a))?t:`troika_${t}_${i}`)));return e=M(e,i,r,n,o),t=M(t,i,c,l,d),{vertexShader:e,fragmentShader:t}}(e,a,i);o=E[r]=t}e.vertexShader=o.vertexShader,e.fragmentShader=o.fragmentShader,_(e.uniforms,this.uniforms),a.timeUniform&&(e.uniforms[a.timeUniform]={get value(){return Date.now()-A}}),this[n]&&this[n](e)},s=function(){return c(a.chained?t:t.clone())},c=function(e){const r=Object.create(e,l);return Object.defineProperty(r,"baseMaterial",{value:t}),Object.defineProperty(r,"id",{value:j++}),r.uuid=function(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,a=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(w[255&e]+w[e>>8&255]+w[e>>16&255]+w[e>>24&255]+"-"+w[255&t]+w[t>>8&255]+"-"+w[t>>16&15|64]+w[t>>24&255]+"-"+w[63&a|128]+w[a>>8&255]+"-"+w[a>>16&255]+w[a>>24&255]+w[255&i]+w[i>>8&255]+w[i>>16&255]+w[i>>24&255]).toUpperCase()}(),r.uniforms=_({},e.uniforms,a.uniforms),r.defines=_({},e.defines,a.defines),r.defines[`TROIKA_DERIVED_MATERIAL_${i}`]="",r.extensions=_({},e.extensions,a.extensions),r._listeners=void 0,r},l={constructor:{value:s},isDerivedMaterial:{value:!0},customProgramCacheKey:{writable:!0,configurable:!0,value:function(){return i}},onBeforeCompile:{get:()=>o,set(e){this[n]=e}},copy:{writable:!0,configurable:!0,value:function(a){return t.copy.call(this,a),t.isShaderMaterial||t.isDerivedMaterial||(_(this.extensions,a.extensions),_(this.defines,a.defines),_(this.uniforms,e.UniformsUtils.clone(a.uniforms))),this}},clone:{writable:!0,configurable:!0,value:function(){const e=new t.constructor;return c(e).copy(this)}},getDepthMaterial:{writable:!0,configurable:!0,value:function(){let i=this._depthMaterial;return i||(i=this._depthMaterial=T(t.isDerivedMaterial?t.getDepthMaterial():new e.MeshDepthMaterial({depthPacking:e.RGBADepthPacking}),a),i.defines.IS_DEPTH_MATERIAL="",i.uniforms=this.uniforms),i}},getDistanceMaterial:{writable:!0,configurable:!0,value:function(){let i=this._distanceMaterial;return i||(i=this._distanceMaterial=T(t.isDerivedMaterial?t.getDistanceMaterial():new e.MeshDistanceMaterial,a),i.defines.IS_DISTANCE_MATERIAL="",i.uniforms=this.uniforms),i}},dispose:{writable:!0,configurable:!0,value(){const{_depthMaterial:e,_distanceMaterial:a}=this;e&&e.dispose(),a&&a.dispose(),t.dispose.call(this)}}};return r[i]=s,new s}function M(e,t,a,i,r){return(i||r||a)&&(e=e.replace(k,`\n${a}\nvoid troikaOrigMain${t}() {`),e+=`\nvoid main() {\n ${i}\n troikaOrigMain${t}();\n ${r}\n}`),e}function F(e,t){return"uniforms"===e?void 0:"function"==typeof t?t.toString():t}let C=0;const I=new Map;const R=g({name:"Typr Font Parser",dependencies:[function(){return"undefined"==typeof window&&(self.window=self),function(e){var t={parse:function(e){var a=t._bin,i=new Uint8Array(e);if("ttcf"==a.readASCII(i,0,4)){var r=4;a.readUshort(i,r),r+=2,a.readUshort(i,r),r+=2;var n=a.readUint(i,r);r+=4;for(var o=[],s=0;s<n;s++){var c=a.readUint(i,r);r+=4,o.push(t._readFont(i,c))}return o}return[t._readFont(i,0)]},_readFont:function(e,a){var i=t._bin,r=a;i.readFixed(e,a),a+=4;var n=i.readUshort(e,a);a+=2,i.readUshort(e,a),a+=2,i.readUshort(e,a),a+=2,i.readUshort(e,a),a+=2;for(var o=["cmap","head","hhea","maxp","hmtx","name","OS/2","post","loca","glyf","kern","CFF ","GPOS","GSUB","SVG "],s={_data:e,_offset:r},c={},l=0;l<n;l++){var d=i.readASCII(e,a,4);a+=4,i.readUint(e,a),a+=4;var f=i.readUint(e,a);a+=4;var h=i.readUint(e,a);a+=4,c[d]={offset:f,length:h}}for(l=0;l<o.length;l++){var u=o[l];c[u]&&(s[u.trim()]=t[u.trim()].parse(e,c[u].offset,c[u].length,s))}return s},_tabOffset:function(e,a,i){for(var r=t._bin,n=r.readUshort(e,i+4),o=i+12,s=0;s<n;s++){var c=r.readASCII(e,o,4);o+=4,r.readUint(e,o),o+=4;var l=r.readUint(e,o);if(o+=4,r.readUint(e,o),o+=4,c==a)return l}return 0}};t._bin={readFixed:function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<8|e[t+3])/65540},readF2dot14:function(e,a){return t._bin.readShort(e,a)/16384},readInt:function(e,a){var i=t._bin.t.uint8;return i[0]=e[a+3],i[1]=e[a+2],i[2]=e[a+1],i[3]=e[a],t._bin.t.int32[0]},readInt8:function(e,a){return t._bin.t.uint8[0]=e[a],t._bin.t.int8[0]},readShort:function(e,a){var i=t._bin.t.uint8;return i[1]=e[a],i[0]=e[a+1],t._bin.t.int16[0]},readUshort:function(e,t){return e[t]<<8|e[t+1]},readUshorts:function(e,a,i){for(var r=[],n=0;n<i;n++)r.push(t._bin.readUshort(e,a+2*n));return r},readUint:function(e,a){var i=t._bin.t.uint8;return i[3]=e[a],i[2]=e[a+1],i[1]=e[a+2],i[0]=e[a+3],t._bin.t.uint32[0]},readUint64:function(e,a){return 4294967296*t._bin.readUint(e,a)+t._bin.readUint(e,a+4)},readASCII:function(e,t,a){for(var i="",r=0;r<a;r++)i+=String.fromCharCode(e[t+r]);return i},readUnicode:function(e,t,a){for(var i="",r=0;r<a;r++){var n=e[t++]<<8|e[t++];i+=String.fromCharCode(n)}return i},_tdec:"undefined"!=typeof window&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(e,a,i){var r=t._bin._tdec;return r&&0==a&&i==e.length?r.decode(e):t._bin.readASCII(e,a,i)},readBytes:function(e,t,a){for(var i=[],r=0;r<a;r++)i.push(e[t+r]);return i},readASCIIArray:function(e,t,a){for(var i=[],r=0;r<a;r++)i.push(String.fromCharCode(e[t+r]));return i}},t._bin.t={buff:new ArrayBuffer(8)},t._bin.t.int8=new Int8Array(t._bin.t.buff),t._bin.t.uint8=new Uint8Array(t._bin.t.buff),t._bin.t.int16=new Int16Array(t._bin.t.buff),t._bin.t.uint16=new Uint16Array(t._bin.t.buff),t._bin.t.int32=new Int32Array(t._bin.t.buff),t._bin.t.uint32=new Uint32Array(t._bin.t.buff),t._lctf={},t._lctf.parse=function(e,a,i,r,n){var o=t._bin,s={},c=a;o.readFixed(e,a),a+=4;var l=o.readUshort(e,a);a+=2;var d=o.readUshort(e,a);a+=2;var f=o.readUshort(e,a);return a+=2,s.scriptList=t._lctf.readScriptList(e,c+l),s.featureList=t._lctf.readFeatureList(e,c+d),s.lookupList=t._lctf.readLookupList(e,c+f,n),s},t._lctf.readLookupList=function(e,a,i){var r=t._bin,n=a,o=[],s=r.readUshort(e,a);a+=2;for(var c=0;c<s;c++){var l=r.readUshort(e,a);a+=2;var d=t._lctf.readLookupTable(e,n+l,i);o.push(d)}return o},t._lctf.readLookupTable=function(e,a,i){var r=t._bin,n=a,o={tabs:[]};o.ltype=r.readUshort(e,a),a+=2,o.flag=r.readUshort(e,a),a+=2;var s=r.readUshort(e,a);a+=2;for(var c=o.ltype,l=0;l<s;l++){var d=r.readUshort(e,a);a+=2;var f=i(e,c,n+d,o);o.tabs.push(f)}return o},t._lctf.numOfOnes=function(e){for(var t=0,a=0;a<32;a++)0!=(e>>>a&1)&&t++;return t},t._lctf.readClassDef=function(e,a){var i=t._bin,r=[],n=i.readUshort(e,a);if(a+=2,1==n){var o=i.readUshort(e,a);a+=2;var s=i.readUshort(e,a);a+=2;for(var c=0;c<s;c++)r.push(o+c),r.push(o+c),r.push(i.readUshort(e,a)),a+=2}if(2==n){var l=i.readUshort(e,a);for(a+=2,c=0;c<l;c++)r.push(i.readUshort(e,a)),a+=2,r.push(i.readUshort(e,a)),a+=2,r.push(i.readUshort(e,a)),a+=2}return r},t._lctf.getInterval=function(e,t){for(var a=0;a<e.length;a+=3){var i=e[a],r=e[a+1];if(e[a+2],i<=t&&t<=r)return a}return-1},t._lctf.readCoverage=function(e,a){var i=t._bin,r={};r.fmt=i.readUshort(e,a),a+=2;var n=i.readUshort(e,a);return a+=2,1==r.fmt&&(r.tab=i.readUshorts(e,a,n)),2==r.fmt&&(r.tab=i.readUshorts(e,a,3*n)),r},t._lctf.coverageIndex=function(e,a){var i=e.tab;if(1==e.fmt)return i.indexOf(a);if(2==e.fmt){var r=t._lctf.getInterval(i,a);if(-1!=r)return i[r+2]+(a-i[r])}return-1},t._lctf.readFeatureList=function(e,a){var i=t._bin,r=a,n=[],o=i.readUshort(e,a);a+=2;for(var s=0;s<o;s++){var c=i.readASCII(e,a,4);a+=4;var l=i.readUshort(e,a);a+=2;var d=t._lctf.readFeatureTable(e,r+l);d.tag=c.trim(),n.push(d)}return n},t._lctf.readFeatureTable=function(e,a){var i=t._bin,r=a,n={},o=i.readUshort(e,a);a+=2,o>0&&(n.featureParams=r+o);var s=i.readUshort(e,a);a+=2,n.tab=[];for(var c=0;c<s;c++)n.tab.push(i.readUshort(e,a+2*c));return n},t._lctf.readScriptList=function(e,a){var i=t._bin,r=a,n={},o=i.readUshort(e,a);a+=2;for(var s=0;s<o;s++){var c=i.readASCII(e,a,4);a+=4;var l=i.readUshort(e,a);a+=2,n[c.trim()]=t._lctf.readScriptTable(e,r+l)}return n},t._lctf.readScriptTable=function(e,a){var i=t._bin,r=a,n={},o=i.readUshort(e,a);a+=2,n.default=t._lctf.readLangSysTable(e,r+o);var s=i.readUshort(e,a);a+=2;for(var c=0;c<s;c++){var l=i.readASCII(e,a,4);a+=4;var d=i.readUshort(e,a);a+=2,n[l.trim()]=t._lctf.readLangSysTable(e,r+d)}return n},t._lctf.readLangSysTable=function(e,a){var i=t._bin,r={};i.readUshort(e,a),a+=2,r.reqFeature=i.readUshort(e,a),a+=2;var n=i.readUshort(e,a);return a+=2,r.features=i.readUshorts(e,a,n),r},t.CFF={},t.CFF.parse=function(e,a,i){var r=t._bin;(e=new Uint8Array(e.buffer,a,i))[a=0],e[++a],e[++a],e[++a],a++;var n=[];a=t.CFF.readIndex(e,a,n);for(var o=[],s=0;s<n.length-1;s++)o.push(r.readASCII(e,a+n[s],n[s+1]-n[s]));a+=n[n.length-1];var c=[];a=t.CFF.readIndex(e,a,c);var l=[];for(s=0;s<c.length-1;s++)l.push(t.CFF.readDict(e,a+c[s],a+c[s+1]));a+=c[c.length-1];var d=l[0],f=[];a=t.CFF.readIndex(e,a,f);var h=[];for(s=0;s<f.length-1;s++)h.push(r.readASCII(e,a+f[s],f[s+1]-f[s]));if(a+=f[f.length-1],t.CFF.readSubrs(e,a,d),d.CharStrings){a=d.CharStrings,f=[],a=t.CFF.readIndex(e,a,f);var u=[];for(s=0;s<f.length-1;s++)u.push(r.readBytes(e,a+f[s],f[s+1]-f[s]));d.CharStrings=u}if(d.ROS){a=d.FDArray;var b=[];for(a=t.CFF.readIndex(e,a,b),d.FDArray=[],s=0;s<b.length-1;s++){var p=t.CFF.readDict(e,a+b[s],a+b[s+1]);t.CFF._readFDict(e,p,h),d.FDArray.push(p)}a+=b[b.length-1],a=d.FDSelect,d.FDSelect=[];var g=e[a];if(a++,3!=g)throw g;var m=r.readUshort(e,a);for(a+=2,s=0;s<m+1;s++)d.FDSelect.push(r.readUshort(e,a),e[a+2]),a+=3}return d.Encoding&&(d.Encoding=t.CFF.readEncoding(e,d.Encoding,d.CharStrings.length)),d.charset&&(d.charset=t.CFF.readCharset(e,d.charset,d.CharStrings.length)),t.CFF._readFDict(e,d,h),d},t.CFF._readFDict=function(e,a,i){var r;for(var n in a.Private&&(r=a.Private[1],a.Private=t.CFF.readDict(e,r,r+a.Private[0]),a.Private.Subrs&&t.CFF.readSubrs(e,r+a.Private.Subrs,a.Private)),a)-1!=["FamilyName","FontName","FullName","Notice","version","Copyright"].indexOf(n)&&(a[n]=i[a[n]-426+35])},t.CFF.readSubrs=function(e,a,i){var r=t._bin,n=[];a=t.CFF.readIndex(e,a,n);var o,s=n.length;o=s<1240?107:s<33900?1131:32768,i.Bias=o,i.Subrs=[];for(var c=0;c<n.length-1;c++)i.Subrs.push(r.readBytes(e,a+n[c],n[c+1]-n[c]))},t.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],t.CFF.glyphByUnicode=function(e,t){for(var a=0;a<e.charset.length;a++)if(e.charset[a]==t)return a;return-1},t.CFF.glyphBySE=function(e,a){return a<0||a>255?-1:t.CFF.glyphByUnicode(e,t.CFF.tableSE[a])},t.CFF.readEncoding=function(e,a,i){t._bin;var r=[".notdef"],n=e[a];if(a++,0!=n)throw"error: unknown encoding format: "+n;var o=e[a];a++;for(var s=0;s<o;s++)r.push(e[a+s]);return r},t.CFF.readCharset=function(e,a,i){var r=t._bin,n=[".notdef"],o=e[a];if(a++,0==o)for(var s=0;s<i;s++){var c=r.readUshort(e,a);a+=2,n.push(c)}else{if(1!=o&&2!=o)throw"error: format: "+o;for(;n.length<i;){c=r.readUshort(e,a),a+=2;var l=0;for(1==o?(l=e[a],a++):(l=r.readUshort(e,a),a+=2),s=0;s<=l;s++)n.push(c),c++}}return n},t.CFF.readIndex=function(e,a,i){var r=t._bin,n=r.readUshort(e,a)+1,o=e[a+=2];if(a++,1==o)for(var s=0;s<n;s++)i.push(e[a+s]);else if(2==o)for(s=0;s<n;s++)i.push(r.readUshort(e,a+2*s));else if(3==o)for(s=0;s<n;s++)i.push(16777215&r.readUint(e,a+3*s-1));else if(1!=n)throw"unsupported offset size: "+o+", count: "+n;return(a+=n*o)-1},t.CFF.getCharString=function(e,a,i){var r=t._bin,n=e[a],o=e[a+1];e[a+2],e[a+3],e[a+4];var s=1,c=null,l=null;n<=20&&(c=n,s=1),12==n&&(c=100*n+o,s=2),21<=n&&n<=27&&(c=n,s=1),28==n&&(l=r.readShort(e,a+1),s=3),29<=n&&n<=31&&(c=n,s=1),32<=n&&n<=246&&(l=n-139,s=1),247<=n&&n<=250&&(l=256*(n-247)+o+108,s=2),251<=n&&n<=254&&(l=256*-(n-251)-o-108,s=2),255==n&&(l=r.readInt(e,a+1)/65535,s=5),i.val=null!=l?l:"o"+c,i.size=s},t.CFF.readCharString=function(e,a,i){for(var r=a+i,n=t._bin,o=[];a<r;){var s=e[a],c=e[a+1];e[a+2],e[a+3],e[a+4];var l=1,d=null,f=null;s<=20&&(d=s,l=1),12==s&&(d=100*s+c,l=2),19!=s&&20!=s||(d=s,l=2),21<=s&&s<=27&&(d=s,l=1),28==s&&(f=n.readShort(e,a+1),l=3),29<=s&&s<=31&&(d=s,l=1),32<=s&&s<=246&&(f=s-139,l=1),247<=s&&s<=250&&(f=256*(s-247)+c+108,l=2),251<=s&&s<=254&&(f=256*-(s-251)-c-108,l=2),255==s&&(f=n.readInt(e,a+1)/65535,l=5),o.push(null!=f?f:"o"+d),a+=l}return o},t.CFF.readDict=function(e,a,i){for(var r=t._bin,n={},o=[];a<i;){var s=e[a],c=e[a+1];e[a+2],e[a+3],e[a+4];var l=1,d=null,f=null;if(28==s&&(f=r.readShort(e,a+1),l=3),29==s&&(f=r.readInt(e,a+1),l=5),32<=s&&s<=246&&(f=s-139,l=1),247<=s&&s<=250&&(f=256*(s-247)+c+108,l=2),251<=s&&s<=254&&(f=256*-(s-251)-c-108,l=2),255==s)throw f=r.readInt(e,a+1)/65535,l=5,"unknown number";if(30==s){var h=[];for(l=1;;){var u=e[a+l];l++;var b=u>>4,p=15&u;if(15!=b&&h.push(b),15!=p&&h.push(p),15==p)break}for(var g="",m=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],H=0;H<h.length;H++)g+=m[h[H]];f=parseFloat(g)}s<=21&&(d=["version","Notice","FullName","FamilyName","Weight","FontBBox","BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StdHW","StdVW","escape","UniqueID","XUID","charset","Encoding","CharStrings","Private","Subrs","defaultWidthX","nominalWidthX"][s],l=1,12==s&&(d=["Copyright","isFixedPitch","ItalicAngle","UnderlinePosition","UnderlineThickness","PaintType","CharstringType","FontMatrix","StrokeWidth","BlueScale","BlueShift","BlueFuzz","StemSnapH","StemSnapV","ForceBold",0,0,"LanguageGroup","ExpansionFactor","initialRandomSeed","SyntheticBase","PostScript","BaseFontName","BaseFontBlend",0,0,0,0,0,0,"ROS","CIDFontVersion","CIDFontRevision","CIDFontType","CIDCount","UIDBase","FDArray","FDSelect","FontName"][c],l=2)),null!=d?(n[d]=1==o.length?o[0]:o,o=[]):o.push(f),a+=l}return n},t.cmap={},t.cmap.parse=function(e,a,i){e=new Uint8Array(e.buffer,a,i),a=0;var r=t._bin,n={};r.readUshort(e,a),a+=2;var o=r.readUshort(e,a);a+=2;var s=[];n.tables=[];for(var c=0;c<o;c++){var l=r.readUshort(e,a);a+=2;var d=r.readUshort(e,a);a+=2;var f=r.readUint(e,a);a+=4;var h="p"+l+"e"+d,u=s.indexOf(f);if(-1==u){var b;u=n.tables.length,s.push(f);var p=r.readUshort(e,f);0==p?b=t.cmap.parse0(e,f):4==p?b=t.cmap.parse4(e,f):6==p?b=t.cmap.parse6(e,f):12==p?b=t.cmap.parse12(e,f):console.debug("unknown format: "+p,l,d,f),n.tables.push(b)}if(null!=n[h])throw"multiple tables for one platform+encoding";n[h]=u}return n},t.cmap.parse0=function(e,a){var i=t._bin,r={};r.format=i.readUshort(e,a),a+=2;var n=i.readUshort(e,a);a+=2,i.readUshort(e,a),a+=2,r.map=[];for(var o=0;o<n-6;o++)r.map.push(e[a+o]);return r},t.cmap.parse4=function(e,a){var i=t._bin,r=a,n={};n.format=i.readUshort(e,a),a+=2;var o=i.readUshort(e,a);a+=2,i.readUshort(e,a),a+=2;var s=i.readUshort(e,a);a+=2;var c=s/2;n.searchRange=i.readUshort(e,a),a+=2,n.entrySelector=i.readUshort(e,a),a+=2,n.rangeShift=i.readUshort(e,a),a+=2,n.endCount=i.readUshorts(e,a,c),a+=2*c,a+=2,n.startCount=i.readUshorts(e,a,c),a+=2*c,n.idDelta=[];for(var l=0;l<c;l++)n.idDelta.push(i.readShort(e,a)),a+=2;for(n.idRangeOffset=i.readUshorts(e,a,c),a+=2*c,n.glyphIdArray=[];a<r+o;)n.glyphIdArray.push(i.readUshort(e,a)),a+=2;return n},t.cmap.parse6=function(e,a){var i=t._bin,r={};r.format=i.readUshort(e,a),a+=2,i.readUshort(e,a),a+=2,i.readUshort(e,a),a+=2,r.firstCode=i.readUshort(e,a),a+=2;var n=i.readUshort(e,a);a+=2,r.glyphIdArray=[];for(var o=0;o<n;o++)r.glyphIdArray.push(i.readUshort(e,a)),a+=2;return r},t.cmap.parse12=function(e,a){var i=t._bin,r={};r.format=i.readUshort(e,a),a+=2,a+=2,i.readUint(e,a),a+=4,i.readUint(e,a),a+=4;var n=i.readUint(e,a);a+=4,r.groups=[];for(var o=0;o<n;o++){var s=a+12*o,c=i.readUint(e,s+0),l=i.readUint(e,s+4),d=i.readUint(e,s+8);r.groups.push([c,l,d])}return r},t.glyf={},t.glyf.parse=function(e,t,a,i){for(var r=[],n=0;n<i.maxp.numGlyphs;n++)r.push(null);return r},t.glyf._parseGlyf=function(e,a){var i=t._bin,r=e._data,n=t._tabOffset(r,"glyf",e._offset)+e.loca[a];if(e.loca[a]==e.loca[a+1])return null;var o={};if(o.noc=i.readShort(r,n),n+=2,o.xMin=i.readShort(r,n),n+=2,o.yMin=i.readShort(r,n),n+=2,o.xMax=i.readShort(r,n),n+=2,o.yMax=i.readShort(r,n),n+=2,o.xMin>=o.xMax||o.yMin>=o.yMax)return null;if(o.noc>0){o.endPts=[];for(var s=0;s<o.noc;s++)o.endPts.push(i.readUshort(r,n)),n+=2;var c=i.readUshort(r,n);if(n+=2,r.length-n<c)return null;o.instructions=i.readBytes(r,n,c),n+=c;var l=o.endPts[o.noc-1]+1;for(o.flags=[],s=0;s<l;s++){var d=r[n];if(n++,o.flags.push(d),0!=(8&d)){var f=r[n];n++;for(var h=0;h<f;h++)o.flags.push(d),s++}}for(o.xs=[],s=0;s<l;s++){var u=0!=(2&o.flags[s]),b=0!=(16&o.flags[s]);u?(o.xs.push(b?r[n]:-r[n]),n++):b?o.xs.push(0):(o.xs.push(i.readShort(r,n)),n+=2)}for(o.ys=[],s=0;s<l;s++)u=0!=(4&o.flags[s]),b=0!=(32&o.flags[s]),u?(o.ys.push(b?r[n]:-r[n]),n++):b?o.ys.push(0):(o.ys.push(i.readShort(r,n)),n+=2);var p=0,g=0;for(s=0;s<l;s++)p+=o.xs[s],g+=o.ys[s],o.xs[s]=p,o.ys[s]=g}else{var m;o.parts=[];do{m=i.readUshort(r,n),n+=2;var H={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(o.parts.push(H),H.glyphIndex=i.readUshort(r,n),n+=2,1&m){var y=i.readShort(r,n);n+=2;var k=i.readShort(r,n);n+=2}else y=i.readInt8(r,n),n++,k=i.readInt8(r,n),n++;2&m?(H.m.tx=y,H.m.ty=k):(H.p1=y,H.p2=k),8&m?(H.m.a=H.m.d=i.readF2dot14(r,n),n+=2):64&m?(H.m.a=i.readF2dot14(r,n),n+=2,H.m.d=i.readF2dot14(r,n),n+=2):128&m&&(H.m.a=i.readF2dot14(r,n),n+=2,H.m.b=i.readF2dot14(r,n),n+=2,H.m.c=i.readF2dot14(r,n),n+=2,H.m.d=i.readF2dot14(r,n),n+=2)}while(32&m);if(256&m){var v=i.readUshort(r,n);for(n+=2,o.instr=[],s=0;s<v;s++)o.instr.push(r[n]),n++}}return o},t.GPOS={},t.GPOS.parse=function(e,a,i,r){return t._lctf.parse(e,a,i,r,t.GPOS.subt)},t.GPOS.subt=function(e,a,i,r){var n=t._bin,o=i,s={};if(s.fmt=n.readUshort(e,i),i+=2,1==a||2==a||3==a||7==a||8==a&&s.fmt<=2){var c=n.readUshort(e,i);i+=2,s.coverage=t._lctf.readCoverage(e,c+o)}if(1==a&&1==s.fmt){var l=n.readUshort(e,i);i+=2;var d=t._lctf.numOfOnes(l);0!=l&&(s.pos=t.GPOS.readValueRecord(e,i,l))}else if(2==a&&s.fmt>=1&&s.fmt<=2){l=n.readUshort(e,i),i+=2;var f=n.readUshort(e,i);i+=2,d=t._lctf.numOfOnes(l);var h=t._lctf.numOfOnes(f);if(1==s.fmt){s.pairsets=[];var u=n.readUshort(e,i);i+=2;for(var b=0;b<u;b++){var p=o+n.readUshort(e,i);i+=2;var g=n.readUshort(e,p);p+=2;for(var m=[],H=0;H<g;H++){var y=n.readUshort(e,p);p+=2,0!=l&&(x=t.GPOS.readValueRecord(e,p,l),p+=2*d),0!=f&&(E=t.GPOS.readValueRecord(e,p,f),p+=2*h),m.push({gid2:y,val1:x,val2:E})}s.pairsets.push(m)}}if(2==s.fmt){var k=n.readUshort(e,i);i+=2;var v=n.readUshort(e,i);i+=2;var w=n.readUshort(e,i);i+=2;var _=n.readUshort(e,i);for(i+=2,s.classDef1=t._lctf.readClassDef(e,o+k),s.classDef2=t._lctf.readClassDef(e,o+v),s.matrix=[],b=0;b<w;b++){var A=[];for(H=0;H<_;H++){var x=null,E=null;0!=l&&(x=t.GPOS.readValueRecord(e,i,l),i+=2*d),0!=f&&(E=t.GPOS.readValueRecord(e,i,f),i+=2*h),A.push({val1:x,val2:E})}s.matrix.push(A)}}}else{if(9==a&&1==s.fmt){var j=n.readUshort(e,i);i+=2;var T=n.readUint(e,i);if(i+=4,9==r.ltype)r.ltype=j;else if(r.ltype!=j)throw"invalid extension substitution";return t.GPOS.subt(e,r.ltype,o+T)}console.debug("unsupported GPOS table LookupType",a,"format",s.fmt)}return s},t.GPOS.readValueRecord=function(e,a,i){var r=t._bin,n=[];return n.push(1&i?r.readShort(e,a):0),a+=1&i?2:0,n.push(2&i?r.readShort(e,a):0),a+=2&i?2:0,n.push(4&i?r.readShort(e,a):0),a+=4&i?2:0,n.push(8&i?r.readShort(e,a):0),a+=8&i?2:0,n},t.GSUB={},t.GSUB.parse=function(e,a,i,r){return t._lctf.parse(e,a,i,r,t.GSUB.subt)},t.GSUB.subt=function(e,a,i,r){var n=t._bin,o=i,s={};if(s.fmt=n.readUshort(e,i),i+=2,1!=a&&4!=a&&5!=a&&6!=a)return null;if(1==a||4==a||5==a&&s.fmt<=2||6==a&&s.fmt<=2){var c=n.readUshort(e,i);i+=2,s.coverage=t._lctf.readCoverage(e,o+c)}if(1==a&&s.fmt>=1&&s.fmt<=2){if(1==s.fmt)s.delta=n.readShort(e,i),i+=2;else if(2==s.fmt){var l=n.readUshort(e,i);i+=2,s.newg=n.readUshorts(e,i,l),i+=2*s.newg.length}}else if(4==a){s.vals=[],l=n.readUshort(e,i),i+=2;for(var d=0;d<l;d++){var f=n.readUshort(e,i);i+=2,s.vals.push(t.GSUB.readLigatureSet(e,o+f))}}else if(5==a&&2==s.fmt){if(2==s.fmt){var h=n.readUshort(e,i);i+=2,s.cDef=t._lctf.readClassDef(e,o+h),s.scset=[];var u=n.readUshort(e,i);for(i+=2,d=0;d<u;d++){var b=n.readUshort(e,i);i+=2,s.scset.push(0==b?null:t.GSUB.readSubClassSet(e,o+b))}}}else if(6==a&&3==s.fmt){if(3==s.fmt){for(d=0;d<3;d++){l=n.readUshort(e,i),i+=2;for(var p=[],g=0;g<l;g++)p.push(t._lctf.readCoverage(e,o+n.readUshort(e,i+2*g)));i+=2*l,0==d&&(s.backCvg=p),1==d&&(s.inptCvg=p),2==d&&(s.ahedCvg=p)}l=n.readUshort(e,i),i+=2,s.lookupRec=t.GSUB.readSubstLookupRecords(e,i,l)}}else{if(7==a&&1==s.fmt){var m=n.readUshort(e,i);i+=2;var H=n.readUint(e,i);if(i+=4,9==r.ltype)r.ltype=m;else if(r.ltype!=m)throw"invalid extension substitution";return t.GSUB.subt(e,r.ltype,o+H)}console.debug("unsupported GSUB table LookupType",a,"format",s.fmt)}return s},t.GSUB.readSubClassSet=function(e,a){var i=t._bin.readUshort,r=a,n=[],o=i(e,a);a+=2;for(var s=0;s<o;s++){var c=i(e,a);a+=2,n.push(t.GSUB.readSubClassRule(e,r+c))}return n},t.GSUB.readSubClassRule=function(e,a){var i=t._bin.readUshort,r={},n=i(e,a),o=i(e,a+=2);a+=2,r.input=[];for(var s=0;s<n-1;s++)r.input.push(i(e,a)),a+=2;return r.substLookupRecords=t.GSUB.readSubstLookupRecords(e,a,o),r},t.GSUB.readSubstLookupRecords=function(e,a,i){for(var r=t._bin.readUshort,n=[],o=0;o<i;o++)n.push(r(e,a),r(e,a+2)),a+=4;return n},t.GSUB.readChainSubClassSet=function(e,a){var i=t._bin,r=a,n=[],o=i.readUshort(e,a);a+=2;for(var s=0;s<o;s++){var c=i.readUshort(e,a);a+=2,n.push(t.GSUB.readChainSubClassRule(e,r+c))}return n},t.GSUB.readChainSubClassRule=function(e,a){for(var i=t._bin,r={},n=["backtrack","input","lookahead"],o=0;o<n.length;o++){var s=i.readUshort(e,a);a+=2,1==o&&s--,r[n[o]]=i.readUshorts(e,a,s),a+=2*r[n[o]].length}return s=i.readUshort(e,a),a+=2,r.subst=i.readUshorts(e,a,2*s),a+=2*r.subst.length,r},t.GSUB.readLigatureSet=function(e,a){var i=t._bin,r=a,n=[],o=i.readUshort(e,a);a+=2;for(var s=0;s<o;s++){var c=i.readUshort(e,a);a+=2,n.push(t.GSUB.readLigature(e,r+c))}return n},t.GSUB.readLigature=function(e,a){var i=t._bin,r={chain:[]};r.nglyph=i.readUshort(e,a),a+=2;var n=i.readUshort(e,a);a+=2;for(var o=0;o<n-1;o++)r.chain.push(i.readUshort(e,a)),a+=2;return r},t.head={},t.head.parse=function(e,a,i){var r=t._bin,n={};return r.readFixed(e,a),a+=4,n.fontRevision=r.readFixed(e,a),a+=4,r.readUint(e,a),a+=4,r.readUint(e,a),a+=4,n.flags=r.readUshort(e,a),a+=2,n.unitsPerEm=r.readUshort(e,a),a+=2,n.created=r.readUint64(e,a),a+=8,n.modified=r.readUint64(e,a),a+=8,n.xMin=r.readShort(e,a),a+=2,n.yMin=r.readShort(e,a),a+=2,n.xMax=r.readShort(e,a),a+=2,n.yMax=r.readShort(e,a),a+=2,n.macStyle=r.readUshort(e,a),a+=2,n.lowestRecPPEM=r.readUshort(e,a),a+=2,n.fontDirectionHint=r.readShort(e,a),a+=2,n.indexToLocFormat=r.readShort(e,a),a+=2,n.glyphDataFormat=r.readShort(e,a),a+=2,n},t.hhea={},t.hhea.parse=function(e,a,i){var r=t._bin,n={};return r.readFixed(e,a),a+=4,n.ascender=r.readShort(e,a),a+=2,n.descender=r.readShort(e,a),a+=2,n.lineGap=r.readShort(e,a),a+=2,n.advanceWidthMax=r.readUshort(e,a),a+=2,n.minLeftSideBearing=r.readShort(e,a),a+=2,n.minRightSideBearing=r.readShort(e,a),a+=2,n.xMaxExtent=r.readShort(e,a),a+=2,n.caretSlopeRise=r.readShort(e,a),a+=2,n.caretSlopeRun=r.readShort(e,a),a+=2,n.caretOffset=r.readShort(e,a),a+=2,a+=8,n.metricDataFormat=r.readShort(e,a),a+=2,n.numberOfHMetrics=r.readUshort(e,a),a+=2,n},t.hmtx={},t.hmtx.parse=function(e,a,i,r){for(var n=t._bin,o={aWidth:[],lsBearing:[]},s=0,c=0,l=0;l<r.maxp.numGlyphs;l++)l<r.hhea.numberOfHMetrics&&(s=n.readUshort(e,a),a+=2,c=n.readShort(e,a),a+=2),o.aWidth.push(s),o.lsBearing.push(c);return o},t.kern={},t.kern.parse=function(e,a,i,r){var n=t._bin,o=n.readUshort(e,a);if(a+=2,1==o)return t.kern.parseV1(e,a-2,i,r);var s=n.readUshort(e,a);a+=2;for(var c={glyph1:[],rval:[]},l=0;l<s;l++){a+=2,i=n.readUshort(e,a),a+=2;var d=n.readUshort(e,a);a+=2;var f=d>>>8;if(0!=(f&=15))throw"unknown kern table format: "+f;a=t.kern.readFormat0(e,a,c)}return c},t.kern.parseV1=function(e,a,i,r){var n=t._bin;n.readFixed(e,a),a+=4;var o=n.readUint(e,a);a+=4;for(var s={glyph1:[],rval:[]},c=0;c<o;c++){n.readUint(e,a),a+=4;var l=n.readUshort(e,a);a+=2,n.readUshort(e,a),a+=2;var d=l>>>8;if(0!=(d&=15))throw"unknown kern table format: "+d;a=t.kern.readFormat0(e,a,s)}return s},t.kern.readFormat0=function(e,a,i){var r=t._bin,n=-1,o=r.readUshort(e,a);a+=2,r.readUshort(e,a),a+=2,r.readUshort(e,a),a+=2,r.readUshort(e,a),a+=2;for(var s=0;s<o;s++){var c=r.readUshort(e,a);a+=2;var l=r.readUshort(e,a);a+=2;var d=r.readShort(e,a);a+=2,c!=n&&(i.glyph1.push(c),i.rval.push({glyph2:[],vals:[]}));var f=i.rval[i.rval.length-1];f.glyph2.push(l),f.vals.push(d),n=c}return a},t.loca={},t.loca.parse=function(e,a,i,r){var n=t._bin,o=[],s=r.head.indexToLocFormat,c=r.maxp.numGlyphs+1;if(0==s)for(var l=0;l<c;l++)o.push(n.readUshort(e,a+(l<<1))<<1);if(1==s)for(l=0;l<c;l++)o.push(n.readUint(e,a+(l<<2)));return o},t.maxp={},t.maxp.parse=function(e,a,i){var r=t._bin,n={},o=r.readUint(e,a);return a+=4,n.numGlyphs=r.readUshort(e,a),a+=2,65536==o&&(n.maxPoints=r.readUshort(e,a),a+=2,n.maxContours=r.readUshort(e,a),a+=2,n.maxCompositePoints=r.readUshort(e,a),a+=2,n.maxCompositeContours=r.readUshort(e,a),a+=2,n.maxZones=r.readUshort(e,a),a+=2,n.maxTwilightPoints=r.readUshort(e,a),a+=2,n.maxStorage=r.readUshort(e,a),a+=2,n.maxFunctionDefs=r.readUshort(e,a),a+=2,n.maxInstructionDefs=r.readUshort(e,a),a+=2,n.maxStackElements=r.readUshort(e,a),a+=2,n.maxSizeOfInstructions=r.readUshort(e,a),a+=2,n.maxComponentElements=r.readUshort(e,a),a+=2,n.maxComponentDepth=r.readUshort(e,a),a+=2),n},t.name={},t.name.parse=function(e,a,i){var r=t._bin,n={};r.readUshort(e,a),a+=2;var o=r.readUshort(e,a);a+=2,r.readUshort(e,a);for(var s,c=["copyright","fontFamily","fontSubfamily","ID","fullName","version","postScriptName","trademark","manufacturer","designer","description","urlVendor","urlDesigner","licence","licenceURL","---","typoFamilyName","typoSubfamilyName","compatibleFull","sampleText","postScriptCID","wwsFamilyName","wwsSubfamilyName","lightPalette","darkPalette"],l=a+=2,d=0;d<o;d++){var f=r.readUshort(e,a);a+=2;var h=r.readUshort(e,a);a+=2;var u=r.readUshort(e,a);a+=2;var b=r.readUshort(e,a);a+=2;var p=r.readUshort(e,a);a+=2;var g=r.readUshort(e,a);a+=2;var m,H=c[b],y=l+12*o+g;if(0==f)m=r.readUnicode(e,y,p/2);else if(3==f&&0==h)m=r.readUnicode(e,y,p/2);else if(0==h)m=r.readASCII(e,y,p);else if(1==h)m=r.readUnicode(e,y,p/2);else if(3==h)m=r.readUnicode(e,y,p/2);else{if(1!=f)throw"unknown encoding "+h+", platformID: "+f;m=r.readASCII(e,y,p),console.debug("reading unknown MAC encoding "+h+" as ASCII")}var k="p"+f+","+u.toString(16);null==n[k]&&(n[k]={}),n[k][void 0!==H?H:b]=m,n[k]._lang=u}for(var v in n)if(null!=n[v].postScriptName&&1033==n[v]._lang)return n[v];for(var v in n)if(null!=n[v].postScriptName&&0==n[v]._lang)return n[v];for(var v in n)if(null!=n[v].postScriptName&&3084==n[v]._lang)return n[v];for(var v in n)if(null!=n[v].postScriptName)return n[v];for(var v in n){s=v;break}return console.debug("returning name table with languageID "+n[s]._lang),n[s]},t["OS/2"]={},t["OS/2"].parse=function(e,a,i){var r=t._bin.readUshort(e,a);a+=2;var n={};if(0==r)t["OS/2"].version0(e,a,n);else if(1==r)t["OS/2"].version1(e,a,n);else if(2==r||3==r||4==r)t["OS/2"].version2(e,a,n);else{if(5!=r)throw"unknown OS/2 table version: "+r;t["OS/2"].version5(e,a,n)}return n},t["OS/2"].version0=function(e,a,i){var r=t._bin;return i.xAvgCharWidth=r.readShort(e,a),a+=2,i.usWeightClass=r.readUshort(e,a),a+=2,i.usWidthClass=r.readUshort(e,a),a+=2,i.fsType=r.readUshort(e,a),a+=2,i.ySubscriptXSize=r.readShort(e,a),a+=2,i.ySubscriptYSize=r.readShort(e,a),a+=2,i.ySubscriptXOffset=r.readShort(e,a),a+=2,i.ySubscriptYOffset=r.readShort(e,a),a+=2,i.ySuperscriptXSize=r.readShort(e,a),a+=2,i.ySuperscriptYSize=r.readShort(e,a),a+=2,i.ySuperscriptXOffset=r.readShort(e,a),a+=2,i.ySuperscriptYOffset=r.readShort(e,a),a+=2,i.yStrikeoutSize=r.readShort(e,a),a+=2,i.yStrikeoutPosition=r.readShort(e,a),a+=2,i.sFamilyClass=r.readShort(e,a),a+=2,i.panose=r.readBytes(e,a,10),a+=10,i.ulUnicodeRange1=r.readUint(e,a),a+=4,i.ulUnicodeRange2=r.readUint(e,a),a+=4,i.ulUnicodeRange3=r.readUint(e,a),a+=4,i.ulUnicodeRange4=r.readUint(e,a),a+=4,i.achVendID=[r.readInt8(e,a),r.readInt8(e,a+1),r.readInt8(e,a+2),r.readInt8(e,a+3)],a+=4,i.fsSelection=r.readUshort(e,a),a+=2,i.usFirstCharIndex=r.readUshort(e,a),a+=2,i.usLastCharIndex=r.readUshort(e,a),a+=2,i.sTypoAscender=r.readShort(e,a),a+=2,i.sTypoDescender=r.readShort(e,a),a+=2,i.sTypoLineGap=r.readShort(e,a),a+=2,i.usWinAscent=r.readUshort(e,a),a+=2,i.usWinDescent=r.readUshort(e,a),a+2},t["OS/2"].version1=function(e,a,i){var r=t._bin;return a=t["OS/2"].version0(e,a,i),i.ulCodePageRange1=r.readUint(e,a),a+=4,i.ulCodePageRange2=r.readUint(e,a),a+4},t["OS/2"].version2=function(e,a,i){var r=t._bin;return a=t["OS/2"].version1(e,a,i),i.sxHeight=r.readShort(e,a),a+=2,i.sCapHeight=r.readShort(e,a),a+=2,i.usDefault=r.readUshort(e,a),a+=2,i.usBreak=r.readUshort(e,a),a+=2,i.usMaxContext=r.readUshort(e,a),a+2},t["OS/2"].version5=function(e,a,i){var r=t._bin;return a=t["OS/2"].version2(e,a,i),i.usLowerOpticalPointSize=r.readUshort(e,a),a+=2,i.usUpperOpticalPointSize=r.readUshort(e,a),a+2},t.post={},t.post.parse=function(e,a,i){var r=t._bin,n={};return n.version=r.readFixed(e,a),a+=4,n.italicAngle=r.readFixed(e,a),a+=4,n.underlinePosition=r.readShort(e,a),a+=2,n.underlineThickness=r.readShort(e,a),a+=2,n},null==t&&(t={}),null==t.U&&(t.U={}),t.U.codeToGlyph=function(e,t){var a=e.cmap,i=-1;if(null!=a.p0e4?i=a.p0e4:null!=a.p3e1?i=a.p3e1:null!=a.p1e0?i=a.p1e0:null!=a.p0e3&&(i=a.p0e3),-1==i)throw"no familiar platform and encoding!";var r=a.tables[i];if(0==r.format)return t>=r.map.length?0:r.map[t];if(4==r.format){for(var n=-1,o=0;o<r.endCount.length;o++)if(t<=r.endCount[o]){n=o;break}return-1==n||r.startCount[n]>t?0:65535&(0!=r.idRangeOffset[n]?r.glyphIdArray[t-r.startCount[n]+(r.idRangeOffset[n]>>1)-(r.idRangeOffset.length-n)]:t+r.idDelta[n])}if(12==r.format){if(t>r.groups[r.groups.length-1][1])return 0;for(o=0;o<r.groups.length;o++){var s=r.groups[o];if(s[0]<=t&&t<=s[1])return s[2]+(t-s[0])}return 0}throw"unknown cmap table format "+r.format},t.U.glyphToPath=function(e,a){var i={cmds:[],crds:[]};if(e.SVG&&e.SVG.entries[a]){var r=e.SVG.entries[a];return null==r?i:("string"==typeof r&&(r=t.SVG.toPath(r),e.SVG.entries[a]=r),r)}if(e.CFF){var n={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:e.CFF.Private?e.CFF.Private.defaultWidthX:0,open:!1},o=e.CFF,s=e.CFF.Private;if(o.ROS){for(var c=0;o.FDSelect[c+2]<=a;)c+=2;s=o.FDArray[o.FDSelect[c+1]].Private}t.U._drawCFF(e.CFF.CharStrings[a],n,o,s,i)}else e.glyf&&t.U._drawGlyf(a,e,i);return i},t.U._drawGlyf=function(e,a,i){var r=a.glyf[e];null==r&&(r=a.glyf[e]=t.glyf._parseGlyf(a,e)),null!=r&&(r.noc>-1?t.U._simpleGlyph(r,i):t.U._compoGlyph(r,a,i))},t.U._simpleGlyph=function(e,a){for(var i=0;i<e.noc;i++){for(var r=0==i?0:e.endPts[i-1]+1,n=e.endPts[i],o=r;o<=n;o++){var s=o==r?n:o-1,c=o==n?r:o+1,l=1&e.flags[o],d=1&e.flags[s],f=1&e.flags[c],h=e.xs[o],u=e.ys[o];if(o==r)if(l){if(!d){t.U.P.moveTo(a,h,u);continue}t.U.P.moveTo(a,e.xs[s],e.ys[s])}else d?t.U.P.moveTo(a,e.xs[s],e.ys[s]):t.U.P.moveTo(a,(e.xs[s]+h)/2,(e.ys[s]+u)/2);l?d&&t.U.P.lineTo(a,h,u):f?t.U.P.qcurveTo(a,h,u,e.xs[c],e.ys[c]):t.U.P.qcurveTo(a,h,u,(h+e.xs[c])/2,(u+e.ys[c])/2)}t.U.P.closePath(a)}},t.U._compoGlyph=function(e,a,i){for(var r=0;r<e.parts.length;r++){var n={cmds:[],crds:[]},o=e.parts[r];t.U._drawGlyf(o.glyphIndex,a,n);for(var s=o.m,c=0;c<n.crds.length;c+=2){var l=n.crds[c],d=n.crds[c+1];i.crds.push(l*s.a+d*s.b+s.tx),i.crds.push(l*s.c+d*s.d+s.ty)}for(c=0;c<n.cmds.length;c++)i.cmds.push(n.cmds[c])}},t.U._getGlyphClass=function(e,a){var i=t._lctf.getInterval(a,e);return-1==i?0:a[i+2]},t.U.getPairAdjustment=function(e,a,i){var r=0;if(e.GPOS)for(var n=e.GPOS,o=n.lookupList,s=n.featureList,c=[],l=0;l<s.length;l++){var d=s[l];if("kern"==d.tag)for(var f=0;f<d.tab.length;f++)if(!c[d.tab[f]]){c[d.tab[f]]=!0;for(var h=o[d.tab[f]],u=0;u<h.tabs.length;u++)if(null!=h.tabs[u]){var b,p=h.tabs[u];if(!p.coverage||-1!=(b=t._lctf.coverageIndex(p.coverage,a)))if(1==h.ltype);else if(2==h.ltype){var g;if(1==p.fmt){var m=p.pairsets[b];for(l=0;l<m.length;l++)m[l].gid2==i&&(g=m[l])}else if(2==p.fmt){var H=t.U._getGlyphClass(a,p.classDef1),y=t.U._getGlyphClass(i,p.classDef2);g=p.matrix[H][y]}g&&g.val1&&g.val1[2]&&(r+=g.val1[2]),g&&g.val2&&g.val2[0]&&(r+=g.val2[0])}}}}if(e.kern){var k=e.kern.glyph1.indexOf(a);if(-1!=k){var v=e.kern.rval[k].glyph2.indexOf(i);-1!=v&&(r+=e.kern.rval[k].vals[v])}}return r},t.U._applySubs=function(e,a,i,r){for(var n=e.length-a-1,o=0;o<i.tabs.length;o++)if(null!=i.tabs[o]){var s,c=i.tabs[o];if(!c.coverage||-1!=(s=t._lctf.coverageIndex(c.coverage,e[a])))if(1==i.ltype)e[a],1==c.fmt?e[a]=e[a]+c.delta:e[a]=c.newg[s];else if(4==i.ltype)for(var l=c.vals[s],d=0;d<l.length;d++){var f=l[d],h=f.chain.length;if(!(h>n)){for(var u=!0,b=0,p=0;p<h;p++){for(;-1==e[a+b+(1+p)];)b++;f.chain[p]!=e[a+b+(1+p)]&&(u=!1)}if(u){for(e[a]=f.nglyph,p=0;p<h+b;p++)e[a+p+1]=-1;break}}}else if(5==i.ltype&&2==c.fmt)for(var g=t._lctf.getInterval(c.cDef,e[a]),m=c.cDef[g+2],H=c.scset[m],y=0;y<H.length;y++){var k=H[y],v=k.input;if(!(v.length>n)){for(u=!0,p=0;p<v.length;p++){var w=t._lctf.getInterval(c.cDef,e[a+1+p]);if(-1==g&&c.cDef[w+2]!=v[p]){u=!1;break}}if(u){var _=k.substLookupRecords;for(d=0;d<_.length;d+=2)_[d],_[d+1]}}}else if(6==i.ltype&&3==c.fmt){if(!t.U._glsCovered(e,c.backCvg,a-c.backCvg.length))continue;if(!t.U._glsCovered(e,c.inptCvg,a))continue;if(!t.U._glsCovered(e,c.ahedCvg,a+c.inptCvg.length))continue;var A=c.lookupRec;for(y=0;y<A.length;y+=2){g=A[y];var x=r[A[y+1]];t.U._applySubs(e,a+g,x,r)}}}},t.U._glsCovered=function(e,a,i){for(var r=0;r<a.length;r++)if(-1==t._lctf.coverageIndex(a[r],e[i+r]))return!1;return!0},t.U.glyphsToPath=function(e,a,i){for(var r={cmds:[],crds:[]},n=0,o=0;o<a.length;o++){var s=a[o];if(-1!=s){for(var c=o<a.length-1&&-1!=a[o+1]?a[o+1]:0,l=t.U.glyphToPath(e,s),d=0;d<l.crds.length;d+=2)r.crds.push(l.crds[d]+n),r.crds.push(l.crds[d+1]);for(i&&r.cmds.push(i),d=0;d<l.cmds.length;d++)r.cmds.push(l.cmds[d]);i&&r.cmds.push("X"),n+=e.hmtx.aWidth[s],o<a.length-1&&(n+=t.U.getPairAdjustment(e,s,c))}}return r},t.U.P={},t.U.P.moveTo=function(e,t,a){e.cmds.push("M"),e.crds.push(t,a)},t.U.P.lineTo=function(e,t,a){e.cmds.push("L"),e.crds.push(t,a)},t.U.P.curveTo=function(e,t,a,i,r,n,o){e.cmds.push("C"),e.crds.push(t,a,i,r,n,o)},t.U.P.qcurveTo=function(e,t,a,i,r){e.cmds.push("Q"),e.crds.push(t,a,i,r)},t.U.P.closePath=function(e){e.cmds.push("Z")},t.U._drawCFF=function(e,a,i,r,n){for(var o=a.stack,s=a.nStems,c=a.haveWidth,l=a.width,d=a.open,f=0,h=a.x,u=a.y,b=0,p=0,g=0,m=0,H=0,y=0,k=0,v=0,w=0,_=0,A={val:0,size:0};f<e.length;){t.CFF.getCharString(e,f,A);var x=A.val;if(f+=A.size,"o1"==x||"o18"==x)o.length%2!=0&&!c&&(l=o.shift()+r.nominalWidthX),s+=o.length>>1,o.length=0,c=!0;else if("o3"==x||"o23"==x)o.length%2!=0&&!c&&(l=o.shift()+r.nominalWidthX),s+=o.length>>1,o.length=0,c=!0;else if("o4"==x)o.length>1&&!c&&(l=o.shift()+r.nominalWidthX,c=!0),d&&t.U.P.closePath(n),u+=o.pop(),t.U.P.moveTo(n,h,u),d=!0;else if("o5"==x)for(;o.length>0;)h+=o.shift(),u+=o.shift(),t.U.P.lineTo(n,h,u);else if("o6"==x||"o7"==x)for(var E=o.length,j="o6"==x,T=0;T<E;T++){var M=o.shift();j?h+=M:u+=M,j=!j,t.U.P.lineTo(n,h,u)}else if("o8"==x||"o24"==x){E=o.length;for(var F=0;F+6<=E;)b=h+o.shift(),p=u+o.shift(),g=b+o.shift(),m=p+o.shift(),h=g+o.shift(),u=m+o.shift(),t.U.P.curveTo(n,b,p,g,m,h,u),F+=6;"o24"==x&&(h+=o.shift(),u+=o.shift(),t.U.P.lineTo(n,h,u))}else{if("o11"==x)break;if("o1234"==x||"o1235"==x||"o1236"==x||"o1237"==x)"o1234"==x&&(p=u,g=(b=h+o.shift())+o.shift(),_=m=p+o.shift(),y=m,v=u,h=(k=(H=(w=g+o.shift())+o.shift())+o.shift())+o.shift(),t.U.P.curveTo(n,b,p,g,m,w,_),t.U.P.curveTo(n,H,y,k,v,h,u))