Files

2 lines
171 KiB
JavaScript
Raw Permalink Normal View History

2026-02-04 00:11:19 +05:00
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a((e=e||self).StandardFonts={})}(this,function(e){"use strict";var a,i=(function(e,a){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function t(e,a){return Object.prototype.hasOwnProperty.call(e,a)}a.assign=function(e){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var i=a.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)t(i,n)&&(e[n]=i[n])}}return e},a.shrinkBuf=function(e,a){return e.length===a?e:e.subarray?e.subarray(0,a):(e.length=a,e)};var n={arraySet:function(e,a,i,t,n){if(a.subarray&&e.subarray)e.set(a.subarray(i,i+t),n);else for(var r=0;r<t;r++)e[n+r]=a[i+r]},flattenChunks:function(e){var a,i,t,n,r,d;for(t=0,a=0,i=e.length;a<i;a++)t+=e[a].length;for(d=new Uint8Array(t),n=0,a=0,i=e.length;a<i;a++)r=e[a],d.set(r,n),n+=r.length;return d}},r={arraySet:function(e,a,i,t,n){for(var r=0;r<t;r++)e[n+r]=a[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};a.setTyped=function(e){e?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,n)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,r))},a.setTyped(i)}(a={exports:{}},a.exports),a.exports),t=(i.assign,i.shrinkBuf,i.setTyped,i.Buf8,i.Buf16,i.Buf32,4),n=0,r=1,d=2;function l(e){for(var a=e.length;--a>=0;)e[a]=0}var h=0,o=1,f=2,u=29,c=256,s=c+1+u,v=30,g=19,V=2*s+1,m=15,q=16,k=7,b=256,F=16,R=17,y=18,x=[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],U=[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],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=new Array(2*(s+2));l(j);var X=new Array(2*v);l(X);var K=new Array(512);l(K);var G=new Array(256);l(G);var N=new Array(u);l(N);var w,p,T,S=new Array(v);function W(e,a,i,t,n){this.static_tree=e,this.extra_bits=a,this.extra_base=i,this.elems=t,this.max_length=n,this.has_stree=e&&e.length}function Z(e,a){this.dyn_tree=e,this.max_code=0,this.stat_desc=a}function P(e){return e<256?K[e]:K[256+(e>>>7)]}function E(e,a){e.pending_buf[e.pending++]=255&a,e.pending_buf[e.pending++]=a>>>8&255}function M(e,a,i){e.bi_valid>q-i?(e.bi_buf|=a<<e.bi_valid&65535,E(e,e.bi_buf),e.bi_buf=a>>q-e.bi_valid,e.bi_valid+=i-q):(e.bi_buf|=a<<e.bi_valid&65535,e.bi_valid+=i)}function C(e,a,i){M(e,i[2*a],i[2*a+1])}function H(e,a){var i=0;do{i|=1&e,e>>>=1,i<<=1}while(--a>0);return i>>>1}function Y(e,a,i){var t,n,r=new Array(m+1),d=0;for(t=1;t<=m;t++)r[t]=d=d+i[t-1]<<1;for(n=0;n<=a;n++){var l=e[2*n+1];0!==l&&(e[2*n]=H(r[l]++,l))}}function I(e){var a;for(a=0;a<s;a++)e.dyn_ltree[2*a]=0;for(a=0;a<v;a++)e.dyn_dtree[2*a]=0;for(a=0;a<g;a++)e.bl_tree[2*a]=0;e.dyn_ltree[2*b]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){e.bi_valid>8?E(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function J(e,a,i,t){var n=2*a,r=2*i;return e[n]<e[r]||e[n]===e[r]&&t[a]<=t[i]}function B(e,a,i){for(var t=e.heap[i],n=i<<1;n<=e.heap_len&&(n<e.heap_len&&J(a,e.heap[n+1],e.heap[n],e.depth)&&n++,!J(a,t,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=t}function D(e,a,i){var t,n,r,d,l=0;if(0!==e.last_lit)do{t=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],n=e.pending_buf[e.l_buf+l],l++,0===t?C(e,n,a):(C(e,(r=G[n])+c+1,a),0!==(d=x[r])&&M(e,n-=N[r],d),C(e,r=P(--t),i),0!==(d=U[r])&&M(e,t-=S[r],d))}while(l<e.last_lit);C(e,b,a)}function Q(e,a){var i,t,n,r=a.dyn_tree,d=a.stat_desc.static_tree,l=a.stat_desc.has_stree,h=a.stat_desc.elems,o=-1;for(e.heap_len=0,e.heap_max=V,i=0;i<h;i++)0!==r[2*i]?(e.heap[++e.heap_len]=o=i,e.depth[i]=0):r[2*i+1]=0;for(;e.heap_len<2;)r[2*(n=e.heap[++e.heap_len]=o<2?++o:0)]=1,e.depth[n]=0,e.opt_len--,l&&(e.static_len-=d[2*n+1]);for(a.max_code=o,i=e.heap_len>>1;i>=1;i--)B(e,r,i);n=h;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],B(e,r,1),t=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=t,r[2*n]=r[2*i]+r[2*t],e.depth[n]=(e.depth[i]>=e.depth[t