Files
YG_FT/frontend/dist/assets/pdf.worker.min-DEtVeC4l.mjs

29 lines
1.2 MiB
JavaScript
Raw Normal View History

/**
* @licstart The following is the entire license notice for the
* JavaScript code in this page
*
* Copyright 2024 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @licend The above is the entire license notice for the
* JavaScript code in this page
*/
/**
* pdfjsVersion = 6.1.200
* pdfjsBuild = 6353acefe
*/
const e=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),t=[1/0,1/0,-1/0,-1/0],a=new Float32Array(t),n=[.001,0,0,.001,0,0],s=1.35,r=.35,i=.25925925925925924,o="http://www.w3.org/2000/svg",l=1,f=2,c=4,h=8,u=16,m=64,p=128,d=256,g="pdfjs_internal_editor_",b=3,w=9,j=13,k=15,y=101,q={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},v=1,S=2,x=3,C=0,F=4,T=1,O=2,R=3,H={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26,RICHMEDIA:27},D="Group",M="R",N=0,_=4,E=1,z=2,L=4,U=16,X=32,W=128,K=512,G=1,V=2,$=4096,Y=8192,J=32768,Q=65536,Z=131072,ee=1048576,te=2097152,ae=8388608,ne=16777216,se=1,re=2,ie=3,oe=4,le=5,fe={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},ce={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},he={O:"PageOpen",C:"PageClose"},ue=1,me=5,pe=1,de=2,ge=3,be=4,we=5,je=6,ke=7,ye=8,qe=9,ve=10,Se=11,Ae=12,xe=13,Ce=14,Ie=15,Fe=16,Te=17,Oe=18,Re=19,He=20,Be=21,De=22,Me=23,Ne=24,Pe=25,_e=26,Ee=27,ze=28,Le=29,Ue=30,Xe=31,We=32,Ke=33,Ge=34,Ve=35,$e=36,Ye=37,Je=38,Qe=39,Ze=40,et=41,tt=42,at=43,nt=44,st=45,rt=46,it=47,ot=48,lt=49,ft=50,ct=51,ht=52,ut=53,mt=54,pt=55,dt=56,gt=57,bt=58,wt=59,jt=60,kt=61,yt=62,qt=63,vt=64,St=65,At=66,xt=67,Ct=68,It=69,Ft=70,Tt=71,Ot=72,Rt=73,Ht=74,Bt=75,Dt=76,Mt=77,Nt=80,Pt=81,_t=83,Et=84,zt=85,Lt=86,Ut=87,Xt=88,Wt=89,Kt=90,Gt=91,Vt=92,$t=93,Yt=94,Jt=0,Qt=1,Zt=2,ea=3,ta=4,aa=1,na=2;let sa=ue;function getVerbosityLevel(){return sa}function info(e){sa>=me&&console.info(`Info: ${e}`)}function warn(e){sa>=ue&&console.warn(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function createValidAbsoluteUrl(e,t=null,a=null){if(!e)return null;if(a&&"string"==typeof e){if(a.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(a.tryConvertEncoding)try{e=stringToUTF8String(e)}catch{}}const n=t?URL.parse(e,t):URL.parse(e);return function _isValidProtocol(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n)?n:null}function shadow(e,t,a,n=!1){Object.defineProperty(e,t,{value:a,enumerable:!n,configurable:!0,writable:!1});return a}const ra=function BaseExceptionClosure(){function BaseException(e,t){this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class PasswordException extends ra{constructor(e,t){super(e,"PasswordException");this.code=t}}class UnknownErrorException extends ra{constructor(e,t){super(e,"UnknownErrorException");this.details=t}}class InvalidPDFException extends ra{constructor(e){super(e,"InvalidPDFException")}}class ResponseException extends ra{constructor(e,t,a){super(e,"ResponseException");this.status=t;this.missing=a}}class FormatError extends ra{constructor(e){super(e,"FormatError")}}class AbortException extends ra{constructor(e){super(e,"AbortException")}}function bytesToString(e){"object"==typeof e&&void 0!==e?.length||unreachable("Invalid argument for bytesToString");const t=e.length,a=8192;if(t<a)return String.fromCharCode.apply(null,e);const n=[];for(let s=0;s<t;s+=a){const r=Math.min(s+a,t),i=e.subarray(s,r);n.push(String.fromCharCode.apply(null,i))}return n.join("")}function stringToBytes(e){"string"!=typeof e&&unreachable("Invalid argument for stringToBytes");const t=e.length,a=new Uint8Array(t);for(let n=0;n<t;++n)a[n]=255&e.charCodeAt(n);return a}function objectSize(e){return Object.keys(e).length}class FeatureTest{static get isLittleEndian(){const e=new Uint8Array(4);e[0]=1;return
/*webpackIgnore: true*/
/*@vite-ignore*/
`${WasmImage.#I}${this._noWasmFilename}`)).default()}catch(e){warn(`#getJsModule: ${e}`)}e(t)}async#$(e,t,a){try{this.#K||(WasmImage.#W?this.#K=await fetchBinaryData(`${WasmImage.#I}${this._filename}`):this.#K=await WasmImage.#U.sendWithPromise("FetchBinaryData",{kind:"wasmUrl",filename:this._filename}));return a((await WebAssembly.instantiate(this.#K,t)).instance)}catch(t){warn(`#instantiateWasm: ${t}`);this.#V(e);return null}}_getModule(e){if(!this.#G){const{promise:t,resolve:a}=Promise.withResolvers(),n=[t];WasmImage.#C?n.push(e({warn,instantiateWasm:this.#$.bind(this,a)})):this.#V(a);this.#G=Promise.race(n)}return this.#G}async decode(e,t){unreachable("Abstract method `decode` called")}}class Jbig2Error extends ra{constructor(e){super(e,"Jbig2Error")}}class JBig2CCITTFaxImage extends WasmImage{_filename="jbig2.wasm";_noWasmFilename="jbig2_nowasm_fallback.js";static get instance(){return shadow(this,"instance",new JBig2CCITTFaxImage(!0))}async decode(e,t,a,n,s){const r=await this._getModule(Qa);if(!r)throw new Jbig2Error("JBig2 failed to initialize");let i,o;try{const l=e.length;i=r._malloc(l);r.writeArrayToMemory(e,i);if(s)r._ccitt_decode(i,l,t,a,s.K,s.EndOfLine?1:0,s.EncodedByteAlign?1:0,s.BlackIs1?1:0,s.Columns,s.Rows);else{const e=n?n.length:0;if(e>0){o=r._malloc(e);r.writeArrayToMemory(n,o)}r._jbig2_decode(i,l,t,a,o,e)}if(!r.imageData)throw new Jbig2Error("Unknown error");const{imageData:f}=r;r.imageData=null;return f}finally{i&&r._free(i);o&&r._free(o)}}}class CCITTFaxStream extends DecodeStream{constructor(e,t,a){super(t);this.stream=e;this.maybeLength=t;this.dict=e.dict;a instanceof Dict||(a=Dict.empty);this.params={K:a.get("K")||0,EndOfLine:!!a.get("EndOfLine"),EncodedByteAlign:!!a.get("EncodedByteAlign"),Columns:a.get("Columns")||1728,Rows:a.get("Rows")||0,EndOfBlock:!!(a.get("EndOfBlock")??1),BlackIs1:!!a.get("BlackIs1")}}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}get isImageStream(){return!0}get isAsyncDecoder(){return!0}async decodeImage(e,t,a){if(this.eof)return this.buffer;e||(e=this.stream.isAsync&&await this.stream.asyncGetBytes()||this.bytes);this.buffer=await JBig2CCITTFaxImage.instance.decode(e,this.dict.get("W","Width"),this.dict.get("H","Height"),null,this.params);this.bufferLength=this.buffer.length;this.eof=!0;return this.buffer}}const Za=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),en=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),tn=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),an=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,5