@kaeawc/auto-mobile 0.0.91 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +12 -12
- package/dist/schemas/README.md +16 -0
- package/dist/schemas/prototype-icon-names.json +302 -0
- package/dist/schemas/test-plan.schema.json +370 -52
- package/dist/src/chunk-00167wan.js +55 -0
- package/dist/src/chunk-0jrrsnc9.js +6 -0
- package/dist/src/chunk-0n6swkwg.js +5 -0
- package/dist/src/chunk-0qsy1qsx.js +57 -0
- package/dist/src/chunk-11m8wj8j.js +237 -0
- package/dist/src/chunk-1p7xf5kb.js +5 -0
- package/dist/src/chunk-23p5f095.js +4 -0
- package/dist/src/chunk-26k317v5.js +5 -0
- package/dist/src/chunk-284ptqa4.js +7 -0
- package/dist/src/chunk-28re4xrg.js +4 -0
- package/dist/src/chunk-2f9rkmhx.js +5 -0
- package/dist/src/chunk-2fxdh48t.js +4 -0
- package/dist/src/chunk-2tbdrbt6.js +4 -0
- package/dist/src/chunk-2tqzq5qh.js +971 -0
- package/dist/src/chunk-32gvv9b4.js +21 -0
- package/dist/src/chunk-3f3t1x97.js +8 -0
- package/dist/src/chunk-3fspkbc7.js +4 -0
- package/dist/src/chunk-3qwrzxh0.js +11 -0
- package/dist/src/chunk-3sy6ahhz.js +26 -0
- package/dist/src/chunk-3vg455e6.js +4 -0
- package/dist/src/chunk-3xkpk44w.js +5 -0
- package/dist/src/chunk-3y6eykz9.js +4 -0
- package/dist/src/chunk-49bsqdx3.js +4 -0
- package/dist/src/chunk-4hw3665t.js +42 -0
- package/dist/src/chunk-58wzr3mt.js +5 -0
- package/dist/src/chunk-5d2hft6c.js +5 -0
- package/dist/src/chunk-5s645vr4.js +4 -0
- package/dist/src/chunk-5snsn9cf.js +4 -0
- package/dist/src/chunk-5tm9mn47.js +54 -0
- package/dist/src/chunk-5zc77a5t.js +4 -0
- package/dist/src/chunk-64j0majr.js +19 -0
- package/dist/src/chunk-65y8v4td.js +17 -0
- package/dist/src/chunk-6awz7vhq.js +5 -0
- package/dist/src/chunk-6bznss4t.js +8 -0
- package/dist/src/chunk-6ep7f5ge.js +4 -0
- package/dist/src/chunk-6pg7bqck.js +4 -0
- package/dist/src/chunk-6wt9rgjf.js +5 -0
- package/dist/src/chunk-6xmss8er.js +8 -0
- package/dist/src/chunk-710rxz9y.js +5 -0
- package/dist/src/chunk-7cs2da62.js +5 -0
- package/dist/src/chunk-7g103b54.js +4 -0
- package/dist/src/chunk-7j5vj4pa.js +4 -0
- package/dist/src/chunk-7rz9898k.js +5 -0
- package/dist/src/chunk-7tw8x05v.js +4 -0
- package/dist/src/chunk-7zy586cb.js +4 -0
- package/dist/src/chunk-8037tzzj.js +5 -0
- package/dist/src/chunk-84nanf8s.js +5 -0
- package/dist/src/chunk-8g1922rp.js +10 -0
- package/dist/src/chunk-8gvwcv2p.js +4 -0
- package/dist/src/chunk-8ph29g99.js +4 -0
- package/dist/src/chunk-8thrmfat.js +4 -0
- package/dist/src/chunk-8zgzzs7k.js +78 -0
- package/dist/src/chunk-97b1zmaq.js +4 -0
- package/dist/src/chunk-9fth9ayh.js +4 -0
- package/dist/src/chunk-9j6anhjr.js +4 -0
- package/dist/src/chunk-aabchzxk.js +9 -0
- package/dist/src/chunk-ayp07wbb.js +4 -0
- package/dist/src/chunk-bfjwqk8q.js +4 -0
- package/dist/src/chunk-bfw6125s.js +5 -0
- package/dist/src/chunk-bnhscm2n.js +4 -0
- package/dist/src/chunk-bxmsax22.js +5 -0
- package/dist/src/chunk-c1vs4g1n.js +4 -0
- package/dist/src/chunk-ct3e7yng.js +4 -0
- package/dist/src/chunk-cyy71ggq.js +5 -0
- package/dist/src/chunk-ddzkz92z.js +4 -0
- package/dist/src/chunk-dgrbdpb7.js +9 -0
- package/dist/src/chunk-drdz8hee.js +5 -0
- package/dist/src/chunk-e98dqnc9.js +145 -0
- package/dist/src/chunk-eersndy7.js +5 -0
- package/dist/src/chunk-eggq53ks.js +4 -0
- package/dist/src/chunk-f2dya7cs.js +4 -0
- package/dist/src/chunk-fbakd6cw.js +4 -0
- package/dist/src/chunk-fgb98zjj.js +5 -0
- package/dist/src/chunk-fmpad823.js +5 -0
- package/dist/src/chunk-g04bwyj3.js +4 -0
- package/dist/src/chunk-g0xr8zw0.js +4 -0
- package/dist/src/chunk-g3rjs80x.js +4 -0
- package/dist/src/chunk-g78rtrfv.js +4 -0
- package/dist/src/chunk-g7tmjbkt.js +5 -0
- package/dist/src/chunk-gabgv3y5.js +4 -0
- package/dist/src/chunk-gmr45m8f.js +4 -0
- package/dist/src/chunk-gsyfebqj.js +4 -0
- package/dist/src/chunk-h5rpn9wr.js +247 -0
- package/dist/src/chunk-hb1x7v55.js +4 -0
- package/dist/src/chunk-hrfytkxh.js +168 -0
- package/dist/src/chunk-j4yjzbak.js +4 -0
- package/dist/src/chunk-jd6a5v6p.js +5 -0
- package/dist/src/chunk-jh6vhqzx.js +5 -0
- package/dist/src/chunk-kn5spq15.js +4 -0
- package/dist/src/chunk-m94qs0f0.js +4 -0
- package/dist/src/chunk-mjrps0ac.js +7 -0
- package/dist/src/chunk-n03dmn5q.js +5 -0
- package/dist/src/chunk-n72qhwd9.js +4 -0
- package/dist/src/chunk-ndt1ccxm.js +71 -0
- package/dist/src/chunk-nr6y0n4y.js +5 -0
- package/dist/src/chunk-pcsen2vs.js +4 -0
- package/dist/src/chunk-ppfr0b8h.js +4 -0
- package/dist/src/chunk-q10bdnat.js +4 -0
- package/dist/src/chunk-q9xmq595.js +4 -0
- package/dist/src/chunk-qcxzr2my.js +5 -0
- package/dist/src/chunk-qf6nynk6.js +7 -0
- package/dist/src/chunk-qyqypn28.js +5 -0
- package/dist/src/chunk-r2epb56s.js +4 -0
- package/dist/src/chunk-r5bxavdx.js +311 -0
- package/dist/src/chunk-r6z1eztj.js +18 -0
- package/dist/src/chunk-r7bpkgff.js +4 -0
- package/dist/src/chunk-r8jf3d92.js +4 -0
- package/dist/src/chunk-rbpdk7m0.js +5 -0
- package/dist/src/chunk-rc0dbypm.js +4 -0
- package/dist/src/chunk-rhcty4ms.js +4 -0
- package/dist/src/chunk-rpvckv3p.js +4 -0
- package/dist/src/chunk-rqc9ap3x.js +4 -0
- package/dist/src/chunk-rvvy1bte.js +7 -0
- package/dist/src/chunk-ry0mz41y.js +4 -0
- package/dist/src/chunk-s3jc6cwp.js +5 -0
- package/dist/src/chunk-sfv61xjb.js +6 -0
- package/dist/src/chunk-t6bfvfkg.js +4 -0
- package/dist/src/chunk-t6c8akcm.js +5 -0
- package/dist/src/chunk-t7w8rctc.js +4 -0
- package/dist/src/chunk-thbh3jew.js +5 -0
- package/dist/src/chunk-v2wd4n3e.js +5 -0
- package/dist/src/chunk-v6pya0dm.js +5 -0
- package/dist/src/chunk-vy3bwm1d.js +17 -0
- package/dist/src/chunk-w3vs79ex.js +27 -0
- package/dist/src/chunk-w4zga19f.js +4 -0
- package/dist/src/chunk-w5b2jwk3.js +14 -0
- package/dist/src/chunk-w7hkv422.js +5 -0
- package/dist/src/chunk-waqwcjyn.js +4 -0
- package/dist/src/chunk-wbh8spm5.js +20 -0
- package/dist/src/chunk-wyrkw6hw.js +5 -0
- package/dist/src/chunk-xa73x2cx.js +5 -0
- package/dist/src/chunk-xgan0qqp.js +4 -0
- package/dist/src/chunk-y2vs6jwg.js +4 -0
- package/dist/src/chunk-yattm52s.js +4 -0
- package/dist/src/chunk-yb97j25b.js +6 -0
- package/dist/src/chunk-ybbtagbt.js +5 -0
- package/dist/src/chunk-ycaj2sgf.js +9 -0
- package/dist/src/chunk-yf7ympyz.js +325 -0
- package/dist/src/chunk-yjawdzk8.js +4 -0
- package/dist/src/chunk-z637nqg8.js +11 -0
- package/dist/src/chunk-zgja5f3p.js +6 -0
- package/dist/src/chunk-zs1sghs9.js +4 -0
- package/dist/src/daemon/processEntry.js +4 -0
- package/dist/src/index.js +4 -2843
- package/dist/src/runtime/bunRuntimeGuard.js +4 -0
- package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
- package/ios/CameraPosterInjection/Injection/CameraPosterInjection.m +466 -0
- package/package.json +7 -6
- package/schemas/README.md +16 -0
- package/schemas/prototype-icon-names.json +302 -0
- package/schemas/test-plan.schema.json +370 -52
- package/node_modules/@borewit/text-codec/README.md +0 -87
- package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
- package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
- package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
- package/node_modules/@jimp/js-png/README.md +0 -35
- package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
- package/node_modules/@jimp/js-png/src/output.png +0 -0
- package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
- package/node_modules/@jimp/plugin-resize/README.md +0 -12
- package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
- package/node_modules/@tokenizer/inflate/README.md +0 -114
- package/node_modules/@tokenizer/token/README.md +0 -19
- package/node_modules/await-to-js/README.md +0 -82
- package/node_modules/debug/README.md +0 -481
- package/node_modules/exif-parser/README.md +0 -83
- package/node_modules/file-type/readme.md +0 -667
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/mime/README.md +0 -178
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/parse-bmfont-xml/README.md +0 -74
- package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
- package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
- package/node_modules/pngjs/README.md +0 -287
- package/node_modules/sax/README.md +0 -228
- package/node_modules/strtok3/README.md +0 -795
- package/node_modules/tinycolor2/README.md +0 -492
- package/node_modules/tinycolor2/cjs/test.js +0 -2191
- package/node_modules/tinycolor2/cjs/test_template.js +0 -26
- package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
- package/node_modules/tinycolor2/esm/test.js +0 -2189
- package/node_modules/tinycolor2/esm/test_template.js +0 -24
- package/node_modules/tinycolor2/tinycolor.js +0 -1191
- package/node_modules/token-types/README.md +0 -160
- package/node_modules/uint8array-extras/readme.md +0 -318
- package/node_modules/xml-parse-from-string/README.md +0 -35
- package/node_modules/xmlbuilder/README.md +0 -86
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/v4/locales/ar.d.cts +0 -4
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.d.cts +0 -4
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.d.cts +0 -4
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.d.cts +0 -4
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.d.cts +0 -4
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.d.cts +0 -4
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/es.d.cts +0 -4
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.d.cts +0 -4
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.d.cts +0 -4
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.d.cts +0 -4
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.d.cts +0 -4
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.d.cts +0 -4
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/index.d.cts +0 -39
- package/node_modules/zod/v4/locales/index.d.ts +0 -39
- package/node_modules/zod/v4/locales/it.d.cts +0 -4
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.d.cts +0 -4
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/kh.d.cts +0 -4
- package/node_modules/zod/v4/locales/kh.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.d.cts +0 -4
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.d.cts +0 -4
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.d.cts +0 -4
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.d.cts +0 -4
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.d.cts +0 -4
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.d.cts +0 -4
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.d.cts +0 -4
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.d.cts +0 -4
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.d.cts +0 -4
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.d.cts +0 -4
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.d.cts +0 -4
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.d.cts +0 -4
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.d.cts +0 -4
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.d.cts +0 -4
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.d.cts +0 -4
- package/node_modules/zod/v4/locales/ua.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.d.cts +0 -4
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.d.cts +0 -4
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
`).slice(0,3).join(" \u2190 "),o="cause"in e&&e.cause!==void 0?Le(e.cause):"";return[r||"Error",n,o?`cause=${o}`:""].filter(Boolean).join(" | ")}if(e===null||e===void 0)return String(e);if(typeof e==="object"){if(Object.keys(e).length===0)return`${Object.prototype.toString.call(e)} (no enumerable keys)`;return re(()=>JSON.stringify(e),()=>Object.prototype.toString.call(e))}return String(e)}function Q(e){return re(()=>{if(e instanceof Error)return e.message;return String(e)},()=>re(()=>Object.prototype.toString.call(e),()=>"Unknown error"))}var ae=()=>{};function en(e,r){if(e instanceof V)return e;let n=Q(e);return new V(`${r}: ${n}`,{cause:e})}function tn(e,r){return new V(`${r} is not supported on platform '${e}'. Supported platforms: android, ios.`)}var V;var pe=J(()=>{ae();V=class V extends Error{constructor(e,r){super(e,r);let n=r?.containerFailure??(r?.cause instanceof V?r.cause.containerFailure:void 0);if(n)this.containerFailure=n}}});import*as De from"path";function ue(e,r,n={}){let o=n.paths??De,f=o.resolve(e),E=o.resolve(f,r),i=o.relative(f,E);if(i==="")return n.allowEqual??!0;return!(i===".."||i.startsWith(`..${o.sep}`)||o.isAbsolute(i))}function rn(e,r,n,o={}){if(!ue(e,r,o))throw n();let f=o.paths??De;return f.resolve(f.resolve(e),r)}var ye=()=>{};import*as Ne from"path";function _e(e,r,n="CtrlProxy bundle"){let o=Ne.resolve(r);for(let f of e.getEntries())if(!ue(o,f.entryName))throw new V(`Refusing to extract ${n}: entry "${f.entryName}" resolves outside the extraction directory ${o} (zip-slip / path traversal).`)}var Ce=J(()=>{pe();ye()});var le=M(function(un,Oe){Oe.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var ee=M(function(Te){var Ae={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",MAX_OUTPUT_EXCEEDED:"Decompressed data exceeds the declared uncompressed size",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DUPLICATE_ENTRY:"Duplicate entry name {0}",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",ZIP64_VALUE_TOO_LARGE:"Zip64 value exceeds the maximum safe integer",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function yt(e){return function(...r){if(r.length)e=e.replace(/\{(\d)\}/g,(n,o)=>r[o]||"");return Error("ADM-ZIP: "+e)}}for(let e of Object.keys(Ae))Te[e]=yt(Ae[e])});var Re=M(function(En,we){var Nt=j("fs"),D=j("path"),oe=le(),q=ee(),_t=typeof process==="object"&&process.platform==="win32",xe=(e)=>typeof e==="object"&&e!==null,Fe=new Uint32Array(256).map((e,r)=>{for(let n=0;n<8;n++)if((r&1)!==0)r=3988292384^r>>>1;else r>>>=1;return r>>>0});function Z(e){if(this.sep=D.sep,this.fs=Nt,xe(e)){if(xe(e.fs)&&typeof e.fs.statSync==="function")this.fs=e.fs}}we.exports=Z;Z.prototype.makeDir=function(e){let r=this;function n(o){let f=o.split(r.sep)[0];o.split(r.sep).forEach(function(E){if(!E||E.substr(-1,1)===":")return;f+=r.sep+E;var i;try{i=r.fs.statSync(f)}catch(m){if(m.message&&m.message.startsWith("ENOENT"))r.fs.mkdirSync(f);else throw m}if(i&&i.isFile())throw q.FILE_IN_THE_WAY(`"${f}"`)})}n(e)};Z.prototype.writeFileTo=function(e,r,n,o){let f=this;if(f.fs.existsSync(e)){if(!n)return!1;var E=f.fs.statSync(e);if(E.isDirectory())return!1}var i=D.dirname(e);if(!f.fs.existsSync(i))f.makeDir(i);var m;try{m=f.fs.openSync(e,"w",438)}catch(C){f.fs.chmodSync(e,438),m=f.fs.openSync(e,"w",438)}if(m)try{f.fs.writeSync(m,r,0,r.length,0)}finally{f.fs.closeSync(m)}return f.fs.chmodSync(e,o||438),!0};Z.prototype.writeFileToAsync=function(e,r,n,o,f){if(typeof o==="function")f=o,o=void 0;let E=this;E.fs.exists(e,function(i){if(i&&!n)return f(!1);E.fs.stat(e,function(m,C){if(i&&C&&C.isDirectory())return f(!1);var S=D.dirname(e);E.fs.exists(S,function(N){if(!N)try{E.makeDir(S)}catch(O){return f(!1)}let _=function(O){E.fs.write(O,r,0,r.length,0,function(T){E.fs.close(O,function(){if(T)return f(!1);E.fs.chmod(e,o||438,function(){f(!0)})})})};E.fs.open(e,"w",438,function(O,T){if(O)E.fs.chmod(e,438,function(){E.fs.open(e,"w",438,function(s,c){if(s||!c)return f(!1);_(c)})});else if(T)_(T);else f(!1)})})})})};Z.prototype.assertPathSafe=function(e,r){let n=this;if(typeof n.fs.lstatSync!=="function")return;let o=D.resolve(e),f=D.resolve(r);if(f===o)return;let E=D.relative(o,f);if(!E||E===".."||E.startsWith(".."+D.sep)||D.isAbsolute(E))return;let i=o;for(let m of E.split(D.sep)){if(!m||m===".")continue;i=D.join(i,m);let C;try{C=n.fs.lstatSync(i)}catch(S){break}if(C.isSymbolicLink())throw q.FILE_IN_THE_WAY(`"${i}"`)}};Z.prototype.findFiles=function(e){let r=this,n=typeof r.fs.lstatSync==="function",o=r.fs.realpathSync(e);function f(i){if(!n)return!1;if(!r.fs.lstatSync(i).isSymbolicLink())return!1;let m;try{m=r.fs.realpathSync(i)}catch(C){return!0}return!(m===o||m.startsWith(o+D.sep))}function E(i,m,C,S){if(typeof m==="boolean")C=m,m=void 0;let N=[];return r.fs.readdirSync(i).forEach(function(_){let O=D.join(i,_);if(f(O))return;let T=r.fs.statSync(O);if(!m||m.test(O))N.push(D.normalize(O)+(T.isDirectory()?r.sep:""));if(T.isDirectory()&&C){let s=r.fs.realpathSync(O);if(!S.has(s))S.add(s),N=N.concat(E(O,m,C,S))}}),N}return E(e,void 0,!0,new Set([o]))};Z.prototype.findFilesAsync=function(e,r){let n=this,o=[],f=!1,E=function(N){if(f)return;f=!0,r(N,N?void 0:o)},i=typeof n.fs.lstat==="function",m=null,C=function(N,_){if(!i)return _(null,!1);n.fs.lstat(N,function(O,T){if(O)return _(O);if(!T||!T.isSymbolicLink())return _(null,!1);n.fs.realpath(N,function(s,c){if(s)return _(null,!0);_(null,!(c===m||c.startsWith(m+D.sep)))})})},S=function(N,_,O){n.fs.readdir(N,function(T,s){if(T)return O(T);let c=s.length;if(!c)return O();s.forEach(function(a){let l=D.join(N,a);C(l,function(d,t){if(d)return O(d);if(t){if(!--c)O();return}n.fs.stat(l,function(u,I){if(u)return O(u);if(!I){if(!--c)O();return}if(o.push(D.normalize(l)+(I.isDirectory()?n.sep:"")),!I.isDirectory()){if(!--c)O();return}n.fs.realpath(l,function(L,g){if(L)return O(L);if(_.has(g)){if(!--c)O();return}_.add(g),S(l,_,function(p){if(p)return O(p);if(!--c)O()})})})})})})};n.fs.realpath(e,function(N,_){if(N)return E(N);m=_,S(e,new Set([_]),E)})};Z.prototype.getAttributes=function(){};Z.prototype.setAttributes=function(){};Z.crc32update=function(e,r){return Fe[(e^r)&255]^e>>>8};Z.crc32=function(e){if(typeof e==="string")e=Buffer.from(e,"utf8");let r=e.length,n=-1;for(let o=0;o<r;)n=Z.crc32update(n,e[o++]);return~n>>>0};Z.methodToString=function(e){switch(e){case oe.STORED:return"STORED ("+e+")";case oe.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Z.canonical=function(e){if(!e)return"";let r=D.posix.normalize("/"+e.split("\\").join("/"));return D.join(".",r)};Z.zipnamefix=function(e){if(!e)return"";let r=D.posix.normalize("/"+e.split("\\").join("/"));return D.posix.join(".",r)};Z.findLast=function(e,r){if(!Array.isArray(e))throw TypeError("arr is not array");let n=e.length>>>0;for(let o=n-1;o>=0;o--)if(r(e[o],o,e))return e[o];return};Z.sanitize=function(e,r){e=D.resolve(D.normalize(e));var n=r.split("/");for(var o=0,f=n.length;o<f;o++){var E=D.normalize(D.join(e,n.slice(o,f).join(D.sep)));if(E===e||E.startsWith(e+D.sep))return E}return D.normalize(D.join(e,D.basename(r)))};Z.toBuffer=function(r,n){if(Buffer.isBuffer(r))return r;else if(r instanceof Uint8Array)return Buffer.from(r);else return typeof r==="string"?n(r):Buffer.alloc(0)};Z.readBigUInt64LE=function(e,r){let n=e.readUInt32LE(r),f=e.readUInt32LE(r+4)*4294967296+n;if(f>Number.MAX_SAFE_INTEGER)throw q.ZIP64_VALUE_TOO_LARGE();return f};Z.writeBigUInt64LE=function(e,r,n){let o=r>>>0,f=Math.floor(r/4294967296)>>>0;e.writeUInt32LE(o,n),e.writeUInt32LE(f,n+4)};Z.fromDOS2Date=function(e){return new Date((e>>25&127)+1980,Math.max((e>>21&15)-1,0),Math.max(e>>16&31,1),e>>11&31,e>>5&63,(e&31)<<1)};Z.fromDate2DOS=function(e){let r=0,n=0;if(e.getFullYear()>1979)r=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1;return r<<16|n};Z.isWin=_t;Z.crcTable=Fe});var Ze=M(function(dn,Be){var Ue=j("path");Be.exports=function(e,{fs:r}){var n=e||"",o=E(),f=null;function E(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(n&&r.existsSync(n))f=r.statSync(n),o.directory=f.isDirectory(),o.mtime=f.mtime,o.atime=f.atime,o.executable=(73&f.mode)!==0,o.readonly=(128&f.mode)===0,o.hidden=Ue.basename(n)[0]===".";else console.warn("Invalid path: "+n);return{get directory(){return o.directory},get readOnly(){return o.readonly},get hidden(){return o.hidden},get mtime(){return o.mtime},get atime(){return o.atime},get executable(){return o.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:n,isDirectory:o.directory,isReadOnly:o.readonly,isHidden:o.hidden,isExecutable:o.executable,mTime:o.mtime,aTime:o.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ve=M(function(mn,Pe){Pe.exports={efs:!0,encode:(e)=>Buffer.from(e,"utf8"),decode:(e)=>e.toString("utf8")}});var K=M(function(hn,X){X.exports=Re();X.exports.Constants=le();X.exports.Errors=ee();X.exports.FileAttr=Ze();X.exports.decoder=ve()});var He=M(function(In,Me){var G=K(),h=G.Constants;Me.exports=function(){var e=20,r=10,n=0,o=0,f=0,E=0,i=0,m=0,C=0,S=0,N=0,_=0,O=0,T=0,s=0;e|=G.isWin?2560:768,n|=h.FLG_EFS;let c={extraLen:0},a=(t)=>Math.max(0,t)>>>0,l=(t)=>Math.max(0,t)&65535,d=(t)=>Math.max(0,t)&255;return f=G.fromDate2DOS(new Date),{get made(){return e},set made(t){e=t},get version(){return r},set version(t){r=t},get flags(){return n},set flags(t){n=t},get flags_efs(){return(n&h.FLG_EFS)>0},set flags_efs(t){if(t)n|=h.FLG_EFS;else n&=~h.FLG_EFS},get flags_desc(){return(n&h.FLG_DESC)>0},set flags_desc(t){if(t)n|=h.FLG_DESC;else n&=~h.FLG_DESC},get method(){return o},set method(t){switch(t){case h.STORED:this.version=10;break;case h.DEFLATED:default:this.version=20}o=t},get time(){return G.fromDOS2Date(this.timeval)},set time(t){t=new Date(t),this.timeval=G.fromDate2DOS(t)},get timeval(){return f},set timeval(t){f=a(t)},get timeHighByte(){return d(f>>>8)},get crc(){return E},set crc(t){E=a(t)},get compressedSize(){return i},set compressedSize(t){i=a(t)},get size(){return m},set size(t){m=a(t)},get fileNameLength(){return C},set fileNameLength(t){C=t},get extraLength(){return S},set extraLength(t){S=t},get extraLocalLength(){return c.extraLen},set extraLocalLength(t){c.extraLen=t},get commentLength(){return N},set commentLength(t){N=t},get diskNumStart(){return _},set diskNumStart(t){_=a(t)},get inAttr(){return O},set inAttr(t){O=a(t)},get attr(){return T},set attr(t){T=a(t)},get fileAttr(){return(T||0)>>16&511},get offset(){return s},set offset(t){s=a(t)},get encrypted(){return(n&h.FLG_ENC)===h.FLG_ENC},get centralHeaderSize(){return h.CENHDR+C+S+N},get realDataOffset(){return s+h.LOCHDR+c.fnameLen+c.extraLen},get localHeader(){return c},loadLocalHeaderFromBinary:function(t){if(s<0||s+h.LOCHDR>t.length)throw G.Errors.INVALID_LOC();var u=t.slice(s,s+h.LOCHDR);if(u.readUInt32LE(0)!==h.LOCSIG)throw G.Errors.INVALID_LOC();c.version=u.readUInt16LE(h.LOCVER),c.flags=u.readUInt16LE(h.LOCFLG),c.flags_desc=(c.flags&h.FLG_DESC)>0,c.method=u.readUInt16LE(h.LOCHOW),c.time=u.readUInt32LE(h.LOCTIM),c.crc=u.readUInt32LE(h.LOCCRC),c.compressedSize=u.readUInt32LE(h.LOCSIZ),c.size=u.readUInt32LE(h.LOCLEN),c.fnameLen=u.readUInt16LE(h.LOCNAM),c.extraLen=u.readUInt16LE(h.LOCEXT);let I=s+h.LOCHDR+c.fnameLen,L=I+c.extraLen;return t.slice(I,L)},loadFromBinary:function(t){if(t.length!==h.CENHDR||t.readUInt32LE(0)!==h.CENSIG)throw G.Errors.INVALID_CEN();e=t.readUInt16LE(h.CENVEM),r=t.readUInt16LE(h.CENVER),n=t.readUInt16LE(h.CENFLG),o=t.readUInt16LE(h.CENHOW),f=t.readUInt32LE(h.CENTIM),E=t.readUInt32LE(h.CENCRC),i=t.readUInt32LE(h.CENSIZ),m=t.readUInt32LE(h.CENLEN),C=t.readUInt16LE(h.CENNAM),S=t.readUInt16LE(h.CENEXT),N=t.readUInt16LE(h.CENCOM),_=t.readUInt16LE(h.CENDSK),O=t.readUInt16LE(h.CENATT),T=t.readUInt32LE(h.CENATX),s=t.readUInt32LE(h.CENOFF)},localHeaderToBinary:function(){var t=Buffer.alloc(h.LOCHDR);return t.writeUInt32LE(h.LOCSIG,0),t.writeUInt16LE(r,h.LOCVER),t.writeUInt16LE(n&~h.FLG_DESC,h.LOCFLG),t.writeUInt16LE(o,h.LOCHOW),t.writeUInt32LE(f,h.LOCTIM),t.writeUInt32LE(E,h.LOCCRC),t.writeUInt32LE(i,h.LOCSIZ),t.writeUInt32LE(m,h.LOCLEN),t.writeUInt16LE(C,h.LOCNAM),t.writeUInt16LE(c.extraLen,h.LOCEXT),t},centralHeaderToBinary:function(){var t=Buffer.alloc(h.CENHDR+C+S+N);return t.writeUInt32LE(h.CENSIG,0),t.writeUInt16LE(e,h.CENVEM),t.writeUInt16LE(r,h.CENVER),t.writeUInt16LE(n&~h.FLG_DESC,h.CENFLG),t.writeUInt16LE(o,h.CENHOW),t.writeUInt32LE(f,h.CENTIM),t.writeUInt32LE(E,h.CENCRC),t.writeUInt32LE(i,h.CENSIZ),t.writeUInt32LE(m,h.CENLEN),t.writeUInt16LE(C,h.CENNAM),t.writeUInt16LE(S,h.CENEXT),t.writeUInt16LE(N,h.CENCOM),t.writeUInt16LE(_,h.CENDSK),t.writeUInt16LE(O,h.CENATT),t.writeUInt32LE(T,h.CENATX),t.writeUInt32LE(s,h.CENOFF),t},toJSON:function(){let t=function(u){return u+" bytes"};return{made:e,version:r,flags:n,method:G.methodToString(o),time:this.time,crc:"0x"+E.toString(16).toUpperCase(),compressedSize:t(i),size:t(m),fileNameLength:t(C),extraLength:t(S),commentLength:t(N),diskNumStart:_,inAttr:O,attr:T,offset:s,centralHeaderSize:t(h.CENHDR+C+S+N)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Ge=M(function(gn,ze){var z=K(),y=z.Constants;ze.exports=function(){var e=0,r=0,n=0,o=0,f=0;let E=()=>e>y.EF_ZIP64_OR_16||r>y.EF_ZIP64_OR_16||n>y.EF_ZIP64_OR_32||o>y.EF_ZIP64_OR_32;return{get diskEntries(){return e},set diskEntries(i){e=r=i},get totalEntries(){return r},set totalEntries(i){r=e=i},get size(){return n},set size(i){n=i},get offset(){return o},set offset(i){o=i},get commentLength(){return f},set commentLength(i){f=i},get mainHeaderSize(){return(E()?y.ZIP64HDR+y.END64HDR:0)+y.ENDHDR+f},loadFromBinary:function(i){if((i.length!==y.ENDHDR||i.readUInt32LE(0)!==y.ENDSIG)&&(i.length<y.ZIP64HDR||i.readUInt32LE(0)!==y.ZIP64SIG))throw z.Errors.INVALID_END();if(i.readUInt32LE(0)===y.ENDSIG)e=i.readUInt16LE(y.ENDSUB),r=i.readUInt16LE(y.ENDTOT),n=i.readUInt32LE(y.ENDSIZ),o=i.readUInt32LE(y.ENDOFF),f=i.readUInt16LE(y.ENDCOM);else e=z.readBigUInt64LE(i,y.ZIP64SUB),r=z.readBigUInt64LE(i,y.ZIP64TOT),n=z.readBigUInt64LE(i,y.ZIP64SIZB),o=z.readBigUInt64LE(i,y.ZIP64OFF),f=0},toBinary:function(){if(!E()){var i=Buffer.alloc(y.ENDHDR+f);return i.writeUInt32LE(y.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(e,y.ENDSUB),i.writeUInt16LE(r,y.ENDTOT),i.writeUInt32LE(n,y.ENDSIZ),i.writeUInt32LE(o,y.ENDOFF),i.writeUInt16LE(f,y.ENDCOM),i.fill(" ",y.ENDHDR),i}var i=Buffer.alloc(this.mainHeaderSize);let m=0;i.writeUInt32LE(y.ZIP64SIG,m),z.writeBigUInt64LE(i,y.ZIP64HDR-y.ZIP64LEAD,m+y.ZIP64SIZE),i.writeUInt16LE(45,m+y.ZIP64VEM),i.writeUInt16LE(45,m+y.ZIP64VER),i.writeUInt32LE(0,m+y.ZIP64DSK),i.writeUInt32LE(0,m+y.ZIP64DSKDIR),z.writeBigUInt64LE(i,e,m+y.ZIP64SUB),z.writeBigUInt64LE(i,r,m+y.ZIP64TOT),z.writeBigUInt64LE(i,n,m+y.ZIP64SIZB),z.writeBigUInt64LE(i,o,m+y.ZIP64OFF);let C=o+n;return m+=y.ZIP64HDR,i.writeUInt32LE(y.END64SIG,m),i.writeUInt32LE(0,m+y.END64START),z.writeBigUInt64LE(i,C,m+y.END64OFF),i.writeUInt32LE(1,m+y.END64NUMDISKS),m+=y.END64HDR,i.writeUInt32LE(y.ENDSIG,m),i.writeUInt32LE(0,m+4),i.writeUInt16LE(Math.min(e,y.EF_ZIP64_OR_16),m+y.ENDSUB),i.writeUInt16LE(Math.min(r,y.EF_ZIP64_OR_16),m+y.ENDTOT),i.writeUInt32LE(Math.min(n,y.EF_ZIP64_OR_32),m+y.ENDSIZ),i.writeUInt32LE(Math.min(o,y.EF_ZIP64_OR_32),m+y.ENDOFF),i.writeUInt16LE(f,m+y.ENDCOM),i.fill(" ",m+y.ENDHDR),i},toJSON:function(){let i=function(m,C){let S=m.toString(16).toUpperCase();while(S.length<C)S="0"+S;return"0x"+S};return{diskEntries:e,totalEntries:r,size:n+" bytes",offset:i(o,4),commentLength:f}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Ee=M(function(Ct){Ct.EntryHeader=He();Ct.MainHeader=Ge()});var je=M(function(pn,be){be.exports=function(e){var r=j("zlib"),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return r.deflateRawSync(e,n)},deflateAsync:function(o){var f=r.createDeflateRaw(n),E=[],i=0;f.on("data",function(m){E.push(m),i+=m.length}),f.on("end",function(){var m=Buffer.alloc(i),C=0;m.fill(0);for(var S=0;S<E.length;S++){var N=E[S];N.copy(m,C),C+=N.length}o&&o(m)}),f.end(e)}}}});var qe=M(function(Dn,We){var At=+(process?.versions?.node??"").split(".")[0]||0,Ve=ee();We.exports=function(e,r){var n=j("zlib");let o=r>0?r:1,f=At>=15?{maxOutputLength:o}:{};return{inflate:function(){return n.inflateRawSync(e,f)},inflateAsync:function(E){var i=n.createInflateRaw(f),m=[],C=0,S=!1;let N=function(_){if(S)return;S=!0,i.destroy(),E&&E(Buffer.alloc(0),_)};i.on("error",function(_){N(_)}),i.on("data",function(_){if(S)return;if(C+=_.length,C>o)return N(Ve.MAX_OUTPUT_EXCEEDED());m.push(_)}),i.on("end",function(){if(S)return;S=!0;var _=Buffer.alloc(C),O=0;_.fill(0);for(var T=0;T<m.length;T++){var s=m[T];s.copy(_,O),O+=s.length}E&&E(_)}),i.end(e)}}}});var Je=M(function(yn,$e){var{randomFillSync:Xe}=j("crypto"),ke=ee(),Tt=new Uint32Array(256).map((e,r)=>{for(let n=0;n<8;n++)if((r&1)!==0)r=r>>>1^3988292384;else r>>>=1;return r>>>0}),Ye=(e,r)=>Math.imul(e,r)>>>0,Ke=(e,r)=>Tt[(e^r)&255]^e>>>8,te=()=>{if(typeof Xe==="function")return Xe(Buffer.alloc(12));else return te.node()};te.node=()=>{let e=Buffer.alloc(12),r=e.length;for(let n=0;n<r;n++)e[n]=Math.random()*256&255;return e};var ie={genSalt:te};function se(e){let r=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let n=0;n<r.length;n++)this.updateKeys(r[n])}se.prototype.updateKeys=function(e){let r=this.keys;return r[0]=Ke(r[0],e),r[1]+=r[0]&255,r[1]=Ye(r[1],134775813)+1,r[2]=Ke(r[2],r[1]>>>24),e};se.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return Ye(e,e^1)>>8&255};function xt(e){let r=new se(e);return function(n){let o=Buffer.alloc(n.length),f=0;for(let E of n)o[f++]=r.updateKeys(E^r.next());return o}}function Ft(e){let r=new se(e);return function(n,o,f=0){if(!o)o=Buffer.alloc(n.length);for(let E of n){let i=r.next();o[f++]=E^i,r.updateKeys(E)}return o}}function wt(e,r,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let o=xt(n),f=o(e.slice(0,12)),E=(r.flags&8)===8?r.timeHighByte:r.crc>>>24;if(f[11]!==E)throw ke.WRONG_PASSWORD();return o(e.slice(12))}function Rt(e){if(Buffer.isBuffer(e)&&e.length>=12)ie.genSalt=function(){return e.slice(0,12)};else if(e==="node")ie.genSalt=te.node;else ie.genSalt=te}function Ut(e,r,n,o=!1){if(e==null)e=Buffer.alloc(0);if(!Buffer.isBuffer(e))e=Buffer.from(e.toString());let f=Ft(n),E=ie.genSalt();if(E[11]=r.crc>>>24&255,o)E[10]=r.crc>>>16&255;let i=Buffer.alloc(e.length+12);return f(E,i),f(e,i,12)}$e.exports={decrypt:wt,encrypt:Ut,_salter:Rt}});var Qe=M(function(Bt){Bt.Deflater=je();Bt.Inflater=qe();Bt.ZipCrypto=Je()});var me=M(function(_n,et){var B=K(),Mt=Ee(),H=B.Constants,de=Qe();et.exports=function(e,r){var n=new Mt.EntryHeader,o=Buffer.alloc(0),f=Buffer.alloc(0),E=!1,i=null,m=Buffer.alloc(0),C=Buffer.alloc(0),S=!0;let N=e,_=typeof N.decoder==="object"?N.decoder:B.decoder;S=_.hasOwnProperty("efs")?_.efs:!1;function O(){if(!r||!(r instanceof Uint8Array))return Buffer.alloc(0);C=n.loadLocalHeaderFromBinary(r);let t=n.realDataOffset,u=t+n.compressedSize;if(t<0||u<t||u>r.length)throw B.Errors.INVALID_LOC();return r.slice(t,u)}function T(t){let u=n.flags_desc||n.localHeader.flags_desc?n.crc:n.localHeader.crc;return B.crc32(t)===u}function s(t,u,I){if(typeof u>"u"&&typeof t==="string")I=t,t=void 0;if(E){if(t&&u)u(Buffer.alloc(0),B.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var L;try{if(L=O(),L.length===0){if(t&&u)u(L);return L}if(n.encrypted){if(typeof I!=="string"&&!Buffer.isBuffer(I))throw B.Errors.INVALID_PASS_PARAM();L=de.ZipCrypto.decrypt(L,n,I)}}catch(x){if(t&&u)return u(Buffer.alloc(0),x),Buffer.alloc(0);throw x}var g;switch(n.method){case B.Constants.STORED:if(g=Buffer.alloc(L.length),L.copy(g),!T(g)){if(t&&u)u(g,B.Errors.BAD_CRC());throw B.Errors.BAD_CRC()}else{if(t&&u)u(g);return g}case B.Constants.DEFLATED:var p=new de.Inflater(L,n.size);if(!t){if(g=p.inflate(),!T(g))throw B.Errors.BAD_CRC(`"${_.decode(o)}"`);return g}else p.inflateAsync(function(x,w){if(!u)return;if(w)u(Buffer.alloc(0),w);else if(!T(x))u(x,B.Errors.BAD_CRC());else u(x)});break;default:if(t&&u)u(Buffer.alloc(0),B.Errors.UNKNOWN_METHOD());throw B.Errors.UNKNOWN_METHOD()}}function c(t,u){if((!i||!i.length)&&Buffer.isBuffer(r)){if(t&&u)u(O());return O()}if(i.length&&!E){var I;switch(n.method){case B.Constants.STORED:if(n.compressedSize=n.size,I=Buffer.alloc(i.length),i.copy(I),t&&u)u(I);return I;default:case B.Constants.DEFLATED:var L=new de.Deflater(i);if(!t){var g=L.deflate();return n.compressedSize=g.length,g}else L.deflateAsync(function(p){I=Buffer.alloc(p.length),n.compressedSize=p.length,p.copy(I),u&&u(I)});L=null;break}}else if(t&&u)u(Buffer.alloc(0));else return Buffer.alloc(0)}function a(t,u){return B.readBigUInt64LE(t,u)}function l(t){try{var u=0,I,L,g;while(u+4<t.length)if(I=t.readUInt16LE(u),u+=2,L=t.readUInt16LE(u),u+=2,g=t.slice(u,u+L),u+=L,H.ID_ZIP64===I)d(g)}catch(p){throw B.Errors.EXTRA_FIELD_PARSE_ERROR()}}function d(t){var u,I,L,g;if(t.length>=H.EF_ZIP64_SCOMP){if(u=a(t,H.EF_ZIP64_SUNCOMP),n.size===H.EF_ZIP64_OR_32)n.size=u}if(t.length>=H.EF_ZIP64_RHO){if(I=a(t,H.EF_ZIP64_SCOMP),n.compressedSize===H.EF_ZIP64_OR_32)n.compressedSize=I}if(t.length>=H.EF_ZIP64_DSN){if(L=a(t,H.EF_ZIP64_RHO),n.offset===H.EF_ZIP64_OR_32)n.offset=L}if(t.length>=H.EF_ZIP64_DSN+4){if(g=t.readUInt32LE(H.EF_ZIP64_DSN),n.diskNumStart===H.EF_ZIP64_OR_16)n.diskNumStart=g}}return{get entryName(){return _.decode(o)},get rawEntryName(){return o},set entryName(t){o=B.toBuffer(t,_.encode);var u=o[o.length-1];E=u===47||u===92,n.fileNameLength=o.length},get efs(){if(typeof S==="function")return S(this.entryName);else return S},get extra(){return m},set extra(t){m=t,n.extraLength=t.length,l(t)},get comment(){return _.decode(f)},set comment(t){if(f=B.toBuffer(t,_.encode),n.commentLength=f.length,f.length>65535)throw B.Errors.COMMENT_TOO_LONG()},get name(){let t=_.decode(o);return E?t.replace(/[/\\]$/,"").split("/").pop():t.split("/").pop()},get isDirectory(){return E},getCompressedData:function(){return c(!1,null)},getCompressedDataAsync:function(t){c(!0,t)},setData:function(t){if(i=B.toBuffer(t,B.decoder.encode),!E&&i.length)n.size=i.length,n.method=B.Constants.DEFLATED,n.crc=B.crc32(t),n.changed=!0;else n.method=B.Constants.STORED},getData:function(t){if(n.changed)return i;else return s(!1,null,t)},getDataAsync:function(t,u){if(n.changed)t(i);else s(!0,t,u)},set attr(t){n.attr=t},get attr(){return n.attr},set header(t){n.loadFromBinary(t)},get header(){return n},packCentralHeader:function(){n.flags_efs=this.efs,n.extraLength=m.length;var t=n.centralHeaderToBinary(),u=B.Constants.CENHDR;return o.copy(t,u),u+=o.length,m.copy(t,u),u+=n.extraLength,f.copy(t,u),t},packLocalHeader:function(){let t=0;n.flags_efs=this.efs,n.extraLocalLength=C.length;let u=n.localHeaderToBinary(),I=Buffer.alloc(u.length+o.length+n.extraLocalLength);return u.copy(I,t),t+=u.length,o.copy(I,t),t+=o.length,C.copy(I,t),t+=C.length,I},toJSON:function(){let t=function(u){return"<"+(u&&u.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:n.toJSON(),compressedData:t(r),data:t(i)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ot=M(function(Cn,rt){var tt=me(),nt=Ee(),R=K();rt.exports=function(e,r){var n=[],o=Object.create(null),f=Buffer.alloc(0),E=new nt.MainHeader,i=!1,m=null;let C=new Set,S=r,{noSort:N,decoder:_}=S;if(e)s(S.readEntries);else i=!0;function O(){let a=new Set;for(let l of Object.keys(o)){let d=l.split("/");if(d.pop(),!d.length)continue;for(let t=0;t<d.length;t++){let u=d.slice(0,t+1).join("/")+"/";a.add(u)}}for(let l of a)if(!(l in o)){let d=new tt(S);d.entryName=l,d.attr=16,d.temporary=!0,n.push(d),o[d.entryName]=d,C.add(d)}}function T(){if(i=!0,o=Object.create(null),E.diskEntries>(e.length-E.offset)/R.Constants.CENHDR)throw R.Errors.DISK_ENTRY_TOO_LARGE();n=Array(E.diskEntries);var a=E.offset;for(var l=0;l<n.length;l++){var d=a,t=new tt(S,e);if(t.header=e.slice(d,d+=R.Constants.CENHDR),t.entryName=e.slice(d,d+=t.header.fileNameLength),t.header.extraLength)t.extra=e.slice(d,d+=t.header.extraLength);if(t.header.commentLength)t.comment=e.slice(d,d+t.header.commentLength);if(a+=t.header.centralHeaderSize,t.entryName in o)throw R.Errors.DUPLICATE_ENTRY(`"${t.entryName}"`);n[l]=t,o[t.entryName]=t}C.clear(),O()}function s(a){var l=e.length-R.Constants.ENDHDR,d=Math.max(0,l-65535),t=d,u=e.length,I=-1,L=0;if(typeof S.trailingSpace==="boolean"?S.trailingSpace:!1)d=0;for(l;l>=t;l--){if(e[l]!==80)continue;if(e.readUInt32LE(l)===R.Constants.ENDSIG){I=l,L=l,u=l+R.Constants.ENDHDR,t=l-R.Constants.END64HDR;continue}if(e.readUInt32LE(l)===R.Constants.END64SIG){t=d;continue}if(e.readUInt32LE(l)===R.Constants.ZIP64SIG){I=l,u=l+R.readBigUInt64LE(e,l+R.Constants.ZIP64SIZE)+R.Constants.ZIP64LEAD;break}}if(I==-1)throw R.Errors.INVALID_FORMAT();if(E.loadFromBinary(e.slice(I,u)),E.commentLength)f=e.slice(L+R.Constants.ENDHDR);if(a)T()}function c(){if(n.length>1&&!N)n=n.map((a)=>({entry:a,key:a.entryName.toLowerCase()})).sort((a,l)=>a.key.localeCompare(l.key)).map((a)=>a.entry)}return{get entries(){if(!i)T();return n.filter((a)=>!C.has(a))},get comment(){return _.decode(f)},set comment(a){f=R.toBuffer(a,_.encode),E.commentLength=f.length},getEntryCount:function(){if(!i)return E.diskEntries;return n.length},forEach:function(a){this.entries.forEach(a)},getEntry:function(a){if(!i)T();return o[a]||null},setEntry:function(a){if(!i)T();n.push(a),o[a.entryName]=a,E.totalEntries=n.length},deleteFile:function(a,l=!0){if(!i)T();let d=o[a];this.getEntryChildren(d,l).map((u)=>u.entryName).forEach(this.deleteEntry)},deleteEntry:function(a){if(!i)T();let l=o[a],d=n.indexOf(l);if(d>=0)n.splice(d,1),delete o[a],E.totalEntries=n.length},getEntryChildren:function(a,l=!0){if(!i)T();if(typeof a==="object")if(a.isDirectory&&l){let d=[],t=a.entryName;for(let u of n)if(u.entryName.startsWith(t))d.push(u);return d}else return[a];return[]},getChildCount:function(a){if(a&&a.isDirectory){let l=this.getEntryChildren(a);return l.includes(a)?l.length-1:l.length}return 0},compressToBuffer:function(){if(!i)T();c();let a=[],l=[],d=0,t=0;E.size=0,E.offset=0;let u=0;for(let g of this.entries){let p=g.getCompressedData();g.header.offset=t;let x=g.packLocalHeader(),w=x.length+p.length;t+=w,a.push(x),a.push(p);let U=g.packCentralHeader();l.push(U),E.size+=U.length,d+=w+U.length,u++}d+=E.mainHeaderSize,E.offset=t,E.totalEntries=u,t=0;let I=Buffer.alloc(d);for(let g of a)g.copy(I,t),t+=g.length;for(let g of l)g.copy(I,t),t+=g.length;let L=E.toBinary();if(f)f.copy(L,L.length-f.length);return L.copy(I,t),e=I,i=!1,I},toAsyncBuffer:function(a,l,d,t){try{if(!i)T();c();let u=[],I=[],L=0,g=0,p=0;E.size=0,E.offset=0;let x=function(w){if(w.length>0){let U=w.shift(),P=U.entryName+U.extra.toString();if(d)d(P);U.getCompressedDataAsync(function(v){if(t)t(P);U.header.offset=g;let b=U.packLocalHeader(),ne=b.length+v.length;g+=ne,u.push(b),u.push(v);let k=U.packCentralHeader();I.push(k),E.size+=k.length,L+=ne+k.length,p++,x(w)})}else{L+=E.mainHeaderSize,E.offset=g,E.totalEntries=p,g=0;let U=Buffer.alloc(L);u.forEach(function(v){v.copy(U,g),g+=v.length}),I.forEach(function(v){v.copy(U,g),g+=v.length});let P=E.toBinary();if(f)f.copy(P,P.length-f.length);P.copy(U,g),e=U,i=!1,a(U)}};x(Array.from(this.entries))}catch(u){l(u)}}}}});var ft=M(function(Sn,st){var F=K(),A=j("path"),Ht=me(),zt=ot(),W=(...e)=>F.findLast(e,(r)=>typeof r==="boolean"),it=(...e)=>F.findLast(e,(r)=>typeof r==="string"),Gt=(...e)=>F.findLast(e,(r)=>typeof r==="function"),bt={noSort:!1,readEntries:!1,method:F.Constants.NONE,fs:null};st.exports=function(e,r){let n=null,o=Object.assign(Object.create(null),bt);if(e&&typeof e==="object"){if(!(e instanceof Uint8Array)){if(Object.assign(o,e),e=o.input?o.input:void 0,o.input)delete o.input}if(Buffer.isBuffer(e))n=e,o.method=F.Constants.BUFFER,e=void 0}Object.assign(o,r);let f=new F(o),E=(s)=>{s.filter((c)=>c.attr).sort((c,a)=>a.path.length-c.path.length).forEach((c)=>f.fs.chmodSync(c.path,c.attr))};if(typeof o.decoder!=="object"||typeof o.decoder.encode!=="function"||typeof o.decoder.decode!=="function")o.decoder=F.decoder;if(e&&typeof e==="string")if(f.fs.existsSync(e))o.method=F.Constants.FILE,o.filename=e,n=f.fs.readFileSync(e);else throw F.Errors.INVALID_FILENAME();let i=new zt(n,o),{canonical:m,sanitize:C,zipnamefix:S}=F;function N(s){if(s&&i){var c;if(typeof s==="string")c=i.getEntry(A.posix.normalize(s));if(typeof s==="object"&&typeof s.entryName<"u"&&typeof s.header<"u")c=i.getEntry(s.entryName);if(c)return c}return null}function _(s){let{join:c,normalize:a,sep:l}=A.posix;return c(A.isAbsolute(s)?"/":".",a(l+s.split("\\").join(l)+l))}function O(s){if(s instanceof RegExp)return function(c){return function(a){return c.test(a)}}(s);else if(typeof s!=="function")return()=>!0;return s}let T=(s,c)=>{let a=c.slice(-1);return a=a===f.sep?f.sep:"",A.relative(s,c)+a};return{readFile:function(s,c){var a=N(s);return a&&a.getData(c)||null},childCount:function(s){let c=N(s);if(c)return i.getChildCount(c)},readFileAsync:function(s,c){var a=N(s);if(a)a.getDataAsync(c);else c(null,"getEntry failed for:"+s)},readAsText:function(s,c){var a=N(s);if(a){var l=a.getData();if(l&&l.length)return l.toString(c||"utf8")}return""},readAsTextAsync:function(s,c,a){var l=N(s);if(l)l.getDataAsync(function(d,t){if(t){c(d,t);return}if(d&&d.length)c(d.toString(a||"utf8"));else c("")});else c("")},deleteFile:function(s,c=!0){var a=N(s);if(a)i.deleteFile(a.entryName,c)},deleteEntry:function(s){var c=N(s);if(c)i.deleteEntry(c.entryName)},addZipComment:function(s){i.comment=s},getZipComment:function(){return i.comment||""},addZipEntryComment:function(s,c){var a=N(s);if(a)a.comment=c},getZipEntryComment:function(s){var c=N(s);if(c)return c.comment||"";return""},updateFile:function(s,c){var a=N(s);if(a)a.setData(c)},addLocalFile:function(s,c,a,l){if(f.fs.existsSync(s)){c=c?_(c):"";let d=A.win32.basename(A.win32.normalize(s));c+=a?a:d;let t=f.fs.statSync(s),u=t.isFile()?f.fs.readFileSync(s):Buffer.alloc(0);if(t.isDirectory())c+=f.sep;this.addFile(c,u,l,t)}else throw F.Errors.FILE_NOT_FOUND(s)},addLocalFileAsync:function(s,c){s=typeof s==="object"?s:{localPath:s};let a=A.resolve(s.localPath),{comment:l}=s,{zipPath:d,zipName:t}=s,u=this;f.fs.stat(a,function(I,L){if(I)return c(I,!1);d=d?_(d):"";let g=A.win32.basename(A.win32.normalize(a));if(d+=t?t:g,L.isFile())f.fs.readFile(a,function(p,x){if(p)return c(p,!1);return u.addFile(d,x,l,L),setImmediate(c,void 0,!0)});else if(L.isDirectory())return d+=f.sep,u.addFile(d,Buffer.alloc(0),l,L),setImmediate(c,void 0,!0)})},addLocalFolder:function(s,c,a){if(a=O(a),c=c?_(c):"",s=A.normalize(s),f.fs.existsSync(s)){let l=f.findFiles(s),d=this;if(l.length)for(let t of l){let u=A.join(c,T(s,t));if(a(u))d.addLocalFile(t,A.dirname(u))}}else throw F.Errors.FILE_NOT_FOUND(s)},addLocalFolderAsync:function(s,c,a,l){l=O(l),a=a?_(a):"",s=A.normalize(s);var d=this;f.fs.open(s,"r",function(t){if(t&&t.code==="ENOENT")c(void 0,F.Errors.FILE_NOT_FOUND(s));else if(t)c(void 0,t);else{var u=f.findFiles(s),I=-1,L=function(){if(I+=1,I<u.length){var g=u[I],p=T(s,g).split("\\").join("/");if(p=p.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),l(p))f.fs.stat(g,function(x,w){if(x)c(void 0,x);if(w.isFile())f.fs.readFile(g,function(U,P){if(U)c(void 0,U);else d.addFile(a+p,P,"",w),L()});else d.addFile(a+p+"/",Buffer.alloc(0),"",w),L()});else process.nextTick(()=>{L()})}else c(!0,void 0)};L()}})},addLocalFolderAsync2:function(s,c){let a=this;s=typeof s==="object"?s:{localPath:s};let l=A.resolve(s.localPath),{zipPath:d,filter:t,namefix:u}=s;if(t instanceof RegExp)t=function(g){return function(p){return g.test(p)}}(t);else if(typeof t!=="function")t=function(){return!0};if(d=d?_(d):"",u==="latin1")u=(g)=>g.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof u!=="function")u=(g)=>g;let I=(g)=>A.join(d,u(T(l,g))),L=(g)=>A.win32.basename(A.win32.normalize(u(g)));f.fs.open(l,"r",function(g){if(g&&g.code==="ENOENT")c(F.Errors.FILE_NOT_FOUND(l),!1);else if(g)c(g,!1);else f.findFilesAsync(l,function(p,x){if(p)return c(p,!1);if(x=x.filter((w)=>t(I(w))),!x.length)return c(void 0,!0);setImmediate(x.reverse().reduce(function(w,U){return function(P,v){if(P||v===!1)return setImmediate(w,P,!1);a.addLocalFileAsync({localPath:U,zipPath:A.dirname(I(U)),zipName:L(U)},w)}},c))})})},addLocalFolderPromise:function(s,c){return new Promise((a,l)=>{this.addLocalFolderAsync2(Object.assign({localPath:s},c),(d,t)=>{if(d)return l(d);if(t)a(this)})})},addFile:function(s,c,a,l){s=S(s);let d=N(s),t=d!=null;if(!t)d=new Ht(o),d.entryName=s;d.comment=a||"";let u=typeof l==="object"&&l instanceof f.fs.Stats;if(u)d.header.time=l.mtime;var I=d.isDirectory?16:0;let L=d.isDirectory?16384:32768;if(u)L|=4095&l.mode;else if(typeof l==="number")L|=4095&l;else L|=d.isDirectory?493:420;if(I=(I|L<<16)>>>0,d.attr=I,d.setData(c),!t)i.setEntry(d);return d},getEntries:function(s){return i.password=s,i?i.entries:[]},getEntry:function(s){return N(s)},getEntryCount:function(){return i.getEntryCount()},forEach:function(s){return i.forEach(s)},extractEntryTo:function(s,c,a,l,d,t){l=W(!1,l),d=W(!1,d),a=W(!0,a),t=it(d,t);var u=N(s);if(!u)throw F.Errors.NO_ENTRY();var I=m(u.entryName),L=C(c,t&&!u.isDirectory?m(t):a?I:A.basename(I));if(u.isDirectory){var g=i.getEntryChildren(u);return g.forEach(function(w){if(w.isDirectory)return;var U=w.getData();if(!U)throw F.Errors.CANT_EXTRACT_FILE();var P=m(a?w.entryName:w.entryName.substring(u.entryName.length)),v=C(c,P);f.assertPathSafe(c,v);let b=d?w.header.fileAttr:void 0;f.writeFileTo(v,U,l,b)}),!0}var p=u.getData(i.password);if(!p)throw F.Errors.CANT_EXTRACT_FILE();if(f.assertPathSafe(c,L),f.fs.existsSync(L)&&!l)throw F.Errors.CANT_OVERRIDE();let x=d?s.header.fileAttr:void 0;return f.writeFileTo(L,p,l,x),!0},test:function(s){if(!i)return!1;for(var c of i.entries)try{if(c.isDirectory)continue;var a=c.getData(s);if(!a)return!1}catch(l){return!1}return!0},extractAllTo:function(s,c,a,l){if(a=W(!1,a),l=it(a,l),c=W(!1,c),!i)throw F.Errors.NO_ZIP();let d=[];i.entries.forEach(function(t){var u=C(s,m(t.entryName));if(f.assertPathSafe(s,u),t.isDirectory){if(f.makeDir(u),a)d.push({path:u,attr:t.header.fileAttr});return}var I=t.getData(l);if(!I)throw F.Errors.CANT_EXTRACT_FILE();let L=a?t.header.fileAttr:void 0;f.writeFileTo(u,I,c,L);try{f.fs.utimesSync(u,t.header.time,t.header.time)}catch(g){}}),E(d)},extractAllToAsync:function(s,c,a,l){if(l=Gt(c,a,l),a=W(!1,a),c=W(!1,c),!l)return new Promise((p,x)=>{this.extractAllToAsync(s,c,a,function(w){if(w)x(w);else p(this)})});if(!i){l(F.Errors.NO_ZIP());return}s=A.resolve(s);let d=(p)=>C(s,A.normalize(m(p.entryName))),t=(p,x)=>Error(p+': "'+x+'"'),u=[],I=[];i.entries.forEach((p)=>{if(p.isDirectory)u.push(p);else I.push(p)});let L=[];for(let p of u){let x=d(p),w=a?p.header.fileAttr:void 0;try{f.assertPathSafe(s,x),f.makeDir(x)}catch(U){l(t("Unable to create folder",x));continue}if(w)L.push({path:x,attr:w});try{f.fs.utimesSync(x,p.header.time,p.header.time)}catch(U){}}let g=(p)=>{if(!p)try{E(L)}catch(x){return l(t("Unable to set folder permissions",x.path||""))}l(p)};I.reverse().reduce(function(p,x){return function(w){if(w)p(w);else{let U=A.normalize(m(x.entryName)),P=C(s,U);try{f.assertPathSafe(s,P)}catch(v){return p(v)}x.getDataAsync(function(v,b){if(b)p(b);else if(!v)p(F.Errors.CANT_EXTRACT_FILE());else{let ne=a?x.header.fileAttr:void 0;f.writeFileToAsync(P,v,c,ne,function(k){if(!k)return p(t("Unable to write file",P));f.fs.utimes(P,x.header.time,x.header.time,function(){p()})})}})}}},g)()},writeZip:function(s,c){if(arguments.length===1){if(typeof s==="function")c=s,s=""}if(!s&&o.filename)s=o.filename;if(!s)return;var a=i.compressToBuffer();if(a){var l=f.writeFileTo(s,a,!0);if(typeof c==="function")c(!l?Error("failed"):null,"")}},writeZipPromise:function(s,c){let{overwrite:a,perm:l}=Object.assign({overwrite:!0},c);return new Promise((d,t)=>{if(!s&&o.filename)s=o.filename;if(!s)t("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((u)=>{let I=(L)=>L?d(L):t("ADM-ZIP: Wasn't able to write zip file");f.writeFileToAsync(s,u,a,l,I)},t)})},toBufferPromise:function(){return new Promise((s,c)=>{i.toAsyncBuffer(s,c)})},toBuffer:function(s,c,a,l){if(typeof s==="function")return i.toAsyncBuffer(s,c,a,l),null;return i.compressToBuffer()}}}});var ct=J(()=>{ae()});Ce();import{parentPort as at,workerData as jt}from"worker_threads";import*as ut from"fs";import*as fe from"path";function Se(e){return(e&73)!==0?448:384}ct();var lt=gt(ft());function Vt(e,r){for(let n of e.getEntries()){if(n.isDirectory)continue;ut.chmodSync(fe.join(r,n.entryName),Se(n.header.fileAttr))}}function Wt(){let{bundlePath:e,destination:r}=jt;try{let n=new lt.default(e);_e(n,r);let o=fe.resolve(r);n.extractAllTo(o,!0),Vt(n,o);let f={ok:!0};at?.postMessage(f)}catch(n){let o={ok:!1,message:Q(n),stack:n instanceof Error?n.stack:void 0};at?.postMessage(o)}}Wt();
|
|
2
|
+
import{Id,fU}from"../../chunk-6wt9rgjf.js";import{r}from"../../chunk-rbpdk7m0.js";import{Nt}from"../../chunk-qcxzr2my.js";import{parentPort as i,workerData as f}from"worker_threads";import*as c from"fs";import*as n from"path";function a(t){return(t&73)!==0?448:384}var m=Nt(Id());function p(t,o){for(let e of t.getEntries()){if(e.isDirectory)continue;c.chmodSync(n.join(o,e.entryName),a(e.header.fileAttr))}}function u(){let{bundlePath:t,destination:o}=f;try{let e=new m.default(t);fU(e,o);let s=n.resolve(o);e.extractAllTo(s,!0),p(e,s);let d={ok:!0};i?.postMessage(d)}catch(e){let s={ok:!1,message:r(e),stack:e instanceof Error?e.stack:void 0};i?.postMessage(s)}}u();
|
|
4
3
|
|
|
5
|
-
//# debugId=
|
|
4
|
+
//# debugId=A3D273C578D4F51764756E2164756E21
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
// Simulator-only proof of concept. Uses public selectors and Objective-C runtime APIs.
|
|
2
|
+
// No hooks are installed unless a poster can be loaded. This is a process-wide fake
|
|
3
|
+
// video pipeline, not a complete AVFoundation device implementation.
|
|
4
|
+
#import <Foundation/Foundation.h>
|
|
5
|
+
#import <UIKit/UIKit.h>
|
|
6
|
+
#import <AVFoundation/AVFoundation.h>
|
|
7
|
+
#import <CoreImage/CoreImage.h>
|
|
8
|
+
#import <CoreMedia/CoreMedia.h>
|
|
9
|
+
#import <CoreVideo/CoreVideo.h>
|
|
10
|
+
#import <ImageIO/ImageIO.h>
|
|
11
|
+
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
|
|
12
|
+
#import <objc/runtime.h>
|
|
13
|
+
#import <math.h>
|
|
14
|
+
|
|
15
|
+
static const size_t AMWidth = 1080, AMHeight = 1440;
|
|
16
|
+
static CGImageRef AMOriginalImage, AMPosterImage;
|
|
17
|
+
static CVPixelBufferRef AMPixels;
|
|
18
|
+
static CMVideoFormatDescriptionRef AMFormat;
|
|
19
|
+
static NSData *AMPNG;
|
|
20
|
+
static AVCaptureDevice *AMDevice;
|
|
21
|
+
static NSArray<AVMetadataObject *> *AMCodes;
|
|
22
|
+
static Class AMDiscoveryClass, AMInputClass, AMCodeClass, AMPhotoClass, AMResolvedClass, AMConnectionClass;
|
|
23
|
+
static char AMStateKey, AMOutputKey, AMSessionKey, AMTypesKey, AMDeviceKey, AMResolvedKey, AMMessageKey, AMIDKey;
|
|
24
|
+
|
|
25
|
+
@interface AMOutputState : NSObject
|
|
26
|
+
@property(nonatomic, weak) id delegate;
|
|
27
|
+
@property(nonatomic, strong) dispatch_queue_t queue;
|
|
28
|
+
@property(nonatomic, weak) AVCaptureSession *session;
|
|
29
|
+
// One fake connection per output, reused for every frame: fake instances are never freed.
|
|
30
|
+
@property(nonatomic, strong) AVCaptureConnection *connection;
|
|
31
|
+
@end
|
|
32
|
+
@implementation AMOutputState
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
@interface AMSessionState : NSObject
|
|
36
|
+
@property(nonatomic) BOOL running;
|
|
37
|
+
@property(nonatomic) NSUInteger generation;
|
|
38
|
+
@property(nonatomic) NSUInteger frame;
|
|
39
|
+
@property(nonatomic, copy) NSString *preset;
|
|
40
|
+
@property(nonatomic, strong) NSMutableArray *inputs;
|
|
41
|
+
@property(nonatomic, strong) NSMutableArray<AVCaptureOutput *> *outputs;
|
|
42
|
+
@property(nonatomic, strong) NSHashTable<AVCaptureVideoPreviewLayer *> *layers;
|
|
43
|
+
@property(nonatomic, strong) dispatch_source_t timer;
|
|
44
|
+
@end
|
|
45
|
+
@implementation AMSessionState
|
|
46
|
+
- (instancetype)init {
|
|
47
|
+
if ((self = [super init])) {
|
|
48
|
+
_inputs = [NSMutableArray array];
|
|
49
|
+
_outputs = [NSMutableArray array];
|
|
50
|
+
_layers = [NSHashTable weakObjectsHashTable];
|
|
51
|
+
_preset = AVCaptureSessionPresetPhoto;
|
|
52
|
+
}
|
|
53
|
+
return self;
|
|
54
|
+
}
|
|
55
|
+
- (void)dealloc { if (_timer) dispatch_source_cancel(_timer); }
|
|
56
|
+
@end
|
|
57
|
+
|
|
58
|
+
static id AMAssociated(id object, const void *key, Class type) {
|
|
59
|
+
@synchronized (object) {
|
|
60
|
+
id value = objc_getAssociatedObject(object, key);
|
|
61
|
+
if (!value) {
|
|
62
|
+
value = [type new];
|
|
63
|
+
objc_setAssociatedObject(object, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
64
|
+
}
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
static AMSessionState *AMState(id session) { return AMAssociated(session, &AMStateKey, AMSessionState.class); }
|
|
69
|
+
static AMOutputState *AMOutput(id output) { return AMAssociated(output, &AMOutputKey, AMOutputState.class); }
|
|
70
|
+
static void AMStore(id object, const void *key, id value) {
|
|
71
|
+
objc_setAssociatedObject(object, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
72
|
+
}
|
|
73
|
+
// class_replaceMethod adds an override when the public method is inherited;
|
|
74
|
+
// exchanging an inherited Method would accidentally change its superclass.
|
|
75
|
+
static void AMReplace(Class type, SEL selector, id block) {
|
|
76
|
+
Method method = class_getInstanceMethod(type, selector);
|
|
77
|
+
NSCAssert(method, @"Missing public method %@", NSStringFromSelector(selector));
|
|
78
|
+
class_replaceMethod(type, selector, imp_implementationWithBlock(block), method_getTypeEncoding(method));
|
|
79
|
+
}
|
|
80
|
+
static Class AMSubclass(Class parent, const char *name) {
|
|
81
|
+
Class type = objc_allocateClassPair(parent, name, 0);
|
|
82
|
+
objc_registerClassPair(type);
|
|
83
|
+
// Instances come from class_createInstance without the parent's init, so the parent's dealloc
|
|
84
|
+
// would tear down state that was never built. Leak them instead (a few small objects per run).
|
|
85
|
+
class_replaceMethod(type, sel_registerName("dealloc"), imp_implementationWithBlock(^(__unsafe_unretained id o) {}), "v@:");
|
|
86
|
+
return type;
|
|
87
|
+
}
|
|
88
|
+
static BOOL AMVideo(AVMediaType media) { return [media isEqualToString:AVMediaTypeVideo]; }
|
|
89
|
+
static BOOL AMMatches(NSArray *types, AVMediaType media) {
|
|
90
|
+
return AMVideo(media) && [types containsObject:AVCaptureDeviceTypeBuiltInWideAngleCamera];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Core Image applies source orientation, then aspect-fills a deterministic canvas.
|
|
94
|
+
// Retain the original separately. PNG permits decoded-pixel comparisons without
|
|
95
|
+
// JPEG loss; its encoded bytes/hash need not match the original source file.
|
|
96
|
+
// Core Image also avoids adding CoreGraphics/QuartzCore link flags to the build.
|
|
97
|
+
static BOOL AMLoadPoster(NSString *path, NSString *qr) {
|
|
98
|
+
CIContext *context = [CIContext contextWithOptions:nil];
|
|
99
|
+
CIImage *source;
|
|
100
|
+
BOOL generated = !path.length;
|
|
101
|
+
if (!generated) {
|
|
102
|
+
source = [CIImage imageWithContentsOfURL:[NSURL fileURLWithPath:path]
|
|
103
|
+
options:@{kCIImageApplyOrientationProperty: @YES}];
|
|
104
|
+
} else {
|
|
105
|
+
CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
|
|
106
|
+
[filter setValue:[qr dataUsingEncoding:NSUTF8StringEncoding] forKey:@"inputMessage"];
|
|
107
|
+
[filter setValue:@"M" forKey:@"inputCorrectionLevel"];
|
|
108
|
+
CIImage *code = filter.outputImage;
|
|
109
|
+
if (!code) return NO;
|
|
110
|
+
// Integer scaling to approximately 640 px, with four white quiet modules.
|
|
111
|
+
CGFloat modules = code.extent.size.width;
|
|
112
|
+
CGFloat scale = MAX(1, floor(640 / (modules + 8)));
|
|
113
|
+
CGFloat side = (modules + 8) * scale;
|
|
114
|
+
CIImage *white = [[CIImage imageWithColor:[CIColor colorWithRed:1 green:1 blue:1]]
|
|
115
|
+
imageByCroppingToRect:CGRectMake(0, 0, side, side)];
|
|
116
|
+
code = [[code imageBySamplingNearest] imageByApplyingTransform:
|
|
117
|
+
(CGAffineTransform){scale, 0, 0, scale, 4 * scale, 4 * scale}];
|
|
118
|
+
source = [code imageByCompositingOverImage:white];
|
|
119
|
+
}
|
|
120
|
+
CGRect extent = source.extent;
|
|
121
|
+
if (!source || !isfinite(extent.size.width) || !isfinite(extent.size.height) ||
|
|
122
|
+
extent.size.width <= 0 || extent.size.height <= 0) return NO;
|
|
123
|
+
AMOriginalImage = [context createCGImage:source fromRect:extent];
|
|
124
|
+
if (!AMOriginalImage) return NO;
|
|
125
|
+
CGFloat sx = (CGFloat)AMWidth / extent.size.width, sy = (CGFloat)AMHeight / extent.size.height;
|
|
126
|
+
// Generated square QR gets white portrait padding to preserve its quiet zone;
|
|
127
|
+
// file posters use aspect-fill and may crop a QR placed near their edges.
|
|
128
|
+
CGFloat scale = generated ? MIN(sx, sy) : MAX(sx, sy);
|
|
129
|
+
CGFloat x = (AMWidth - extent.size.width * scale) / 2 - extent.origin.x * scale;
|
|
130
|
+
CGFloat y = (AMHeight - extent.size.height * scale) / 2 - extent.origin.y * scale;
|
|
131
|
+
if (generated) source = [source imageBySamplingNearest];
|
|
132
|
+
CIImage *scaled = [source imageByApplyingTransform:(CGAffineTransform){scale, 0, 0, scale, x, y}];
|
|
133
|
+
CGRect canvas = CGRectMake(0, 0, AMWidth, AMHeight);
|
|
134
|
+
CIImage *white = [[CIImage imageWithColor:[CIColor colorWithRed:1 green:1 blue:1]] imageByCroppingToRect:canvas];
|
|
135
|
+
CIImage *poster = [[scaled imageByCompositingOverImage:white] imageByCroppingToRect:canvas];
|
|
136
|
+
AMPosterImage = [context createCGImage:poster fromRect:canvas];
|
|
137
|
+
if (!AMPosterImage) return NO;
|
|
138
|
+
AMPNG = UIImagePNGRepresentation([UIImage imageWithCGImage:AMPosterImage]);
|
|
139
|
+
NSDictionary *attrs = @{(id)kCVPixelBufferCGImageCompatibilityKey: @YES,
|
|
140
|
+
(id)kCVPixelBufferIOSurfacePropertiesKey: @{}};
|
|
141
|
+
if (CVPixelBufferCreate(kCFAllocatorDefault, AMWidth, AMHeight, kCVPixelFormatType_32BGRA,
|
|
142
|
+
(__bridge CFDictionaryRef)attrs, &ixels) != kCVReturnSuccess) return NO;
|
|
143
|
+
[context render:[CIImage imageWithCGImage:AMPosterImage] toCVPixelBuffer:AMPixels bounds:canvas colorSpace:nil];
|
|
144
|
+
return AMPNG && CMVideoFormatDescriptionCreateForImageBuffer(kCFAllocatorDefault, AMPixels, &AMFormat) == noErr;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// init-family replacements need actual init-family ARC ownership conventions.
|
|
148
|
+
@interface AVCaptureDeviceInput (AMPoster)
|
|
149
|
+
- (instancetype)am_initWithDevice:(AVCaptureDevice *)device error:(NSError **)error __attribute__((objc_method_family(init)));
|
|
150
|
+
@end
|
|
151
|
+
@implementation AVCaptureDeviceInput (AMPoster)
|
|
152
|
+
- (instancetype)am_initWithDevice:(AVCaptureDevice *)device error:(NSError **)error {
|
|
153
|
+
if (device != AMDevice) return [self am_initWithDevice:device error:error];
|
|
154
|
+
self = (id)class_createInstance(AMInputClass, 0);
|
|
155
|
+
if (error) *error = nil;
|
|
156
|
+
AMStore(self, &AMDeviceKey, device);
|
|
157
|
+
return self;
|
|
158
|
+
}
|
|
159
|
+
@end
|
|
160
|
+
|
|
161
|
+
static void AMBindLayer(AVCaptureVideoPreviewLayer *layer, AVCaptureSession *session) {
|
|
162
|
+
AVCaptureSession *old = objc_getAssociatedObject(layer, &AMSessionKey);
|
|
163
|
+
if (old) { AMSessionState *s = AMState(old); @synchronized (s) { [s.layers removeObject:layer]; } }
|
|
164
|
+
AMStore(layer, &AMSessionKey, session);
|
|
165
|
+
if (session) { AMSessionState *s = AMState(session); @synchronized (s) { [s.layers addObject:layer]; } }
|
|
166
|
+
layer.contents = session && session.isRunning ? (__bridge id)AMPosterImage : nil;
|
|
167
|
+
// Public CALayer string values avoid a separate QuartzCore link dependency.
|
|
168
|
+
layer.contentsScale = 1;
|
|
169
|
+
layer.minificationFilter = @"nearest"; layer.magnificationFilter = @"nearest";
|
|
170
|
+
}
|
|
171
|
+
@interface AVCaptureVideoPreviewLayer (AMPoster)
|
|
172
|
+
- (instancetype)am_initWithSession:(AVCaptureSession *)session __attribute__((objc_method_family(init)));
|
|
173
|
+
@end
|
|
174
|
+
@implementation AVCaptureVideoPreviewLayer (AMPoster)
|
|
175
|
+
- (instancetype)am_initWithSession:(AVCaptureSession *)session {
|
|
176
|
+
// After the exchange, am_initWithSession: is the stock implementation: run it with no session so
|
|
177
|
+
// AVFoundation's private layer state is initialised, then bind the poster session ourselves.
|
|
178
|
+
self = [self am_initWithSession:nil];
|
|
179
|
+
if (self) {
|
|
180
|
+
self.videoGravity = AVLayerVideoGravityResizeAspect;
|
|
181
|
+
AMBindLayer(self, session);
|
|
182
|
+
}
|
|
183
|
+
return self;
|
|
184
|
+
}
|
|
185
|
+
@end
|
|
186
|
+
|
|
187
|
+
static void AMExchange(Class cls, SEL original, SEL replacement) {
|
|
188
|
+
method_exchangeImplementations(class_getInstanceMethod(cls, original), class_getInstanceMethod(cls, replacement));
|
|
189
|
+
}
|
|
190
|
+
static void AMInstallObjects(void) {
|
|
191
|
+
Class device = AMSubclass(AVCaptureDevice.class, "AMPosterDevice");
|
|
192
|
+
AMReplace(device, @selector(uniqueID), ^id(id o) { return @"AMCameraPoster.back"; });
|
|
193
|
+
AMReplace(device, @selector(localizedName), ^id(id o) { return @"AutoMobile Poster Camera"; });
|
|
194
|
+
AMReplace(device, @selector(position), ^AVCaptureDevicePosition(id o) { return AVCaptureDevicePositionBack; });
|
|
195
|
+
AMReplace(device, @selector(deviceType), ^id(id o) { return AVCaptureDeviceTypeBuiltInWideAngleCamera; });
|
|
196
|
+
AMReplace(device, @selector(hasMediaType:), ^BOOL(id o, AVMediaType media) { return AMVideo(media); });
|
|
197
|
+
AMReplace(device, @selector(isConnected), ^BOOL(id o) { return YES; });
|
|
198
|
+
AMReplace(device, @selector(formats), ^id(id o) { return @[]; });
|
|
199
|
+
AMReplace(device, @selector(activeFormat), ^id(id o) { return nil; });
|
|
200
|
+
AMDevice = (id)class_createInstance(device, 0);
|
|
201
|
+
AMDiscoveryClass = AMSubclass(AVCaptureDeviceDiscoverySession.class, "AMPosterDiscovery");
|
|
202
|
+
AMReplace(AMDiscoveryClass, @selector(devices), ^id(id o) { return @[AMDevice]; });
|
|
203
|
+
AMReplace(AMDiscoveryClass, @selector(supportedMultiCamDeviceSets), ^id(id o) { return @[]; });
|
|
204
|
+
AMInputClass = AMSubclass(AVCaptureDeviceInput.class, "AMPosterInput");
|
|
205
|
+
AMReplace(AMInputClass, @selector(device), ^id(id o) { return objc_getAssociatedObject(o, &AMDeviceKey); });
|
|
206
|
+
AMReplace(AMInputClass, @selector(ports), ^id(id o) { return @[]; });
|
|
207
|
+
AMConnectionClass = AMSubclass(AVCaptureConnection.class, "AMPosterConnection");
|
|
208
|
+
AMReplace(AMConnectionClass, @selector(isEnabled), ^BOOL(id o) { return YES; });
|
|
209
|
+
AMReplace(AMConnectionClass, @selector(isActive), ^BOOL(id o) { return YES; });
|
|
210
|
+
AMReplace(AMConnectionClass, @selector(inputPorts), ^id(id o) { return @[]; });
|
|
211
|
+
AMReplace(AMConnectionClass, @selector(output), ^id(id o) { return objc_getAssociatedObject(o, &AMOutputKey); });
|
|
212
|
+
AMCodeClass = AMSubclass(AVMetadataMachineReadableCodeObject.class, "AMPosterCode");
|
|
213
|
+
AMReplace(AMCodeClass, @selector(stringValue), ^id(id o) { return objc_getAssociatedObject(o, &AMMessageKey); });
|
|
214
|
+
AMReplace(AMCodeClass, @selector(type), ^id(id o) { return AVMetadataObjectTypeQRCode; });
|
|
215
|
+
AMReplace(AMCodeClass, @selector(bounds), ^CGRect(id o) { return CGRectMake(0.1, 0.1, 0.8, 0.8); });
|
|
216
|
+
AMReplace(AMCodeClass, @selector(corners), ^id(id o) {
|
|
217
|
+
return @[@{@"X": @0.1, @"Y": @0.1}, @{@"X": @0.9, @"Y": @0.1},
|
|
218
|
+
@{@"X": @0.9, @"Y": @0.9}, @{@"X": @0.1, @"Y": @0.9}];
|
|
219
|
+
});
|
|
220
|
+
AMReplace(AMCodeClass, @selector(time), ^CMTime(id o) { return CMClockGetTime(CMClockGetHostTimeClock()); });
|
|
221
|
+
AMReplace(AMCodeClass, @selector(duration), ^CMTime(id o) { return CMTimeMake(1, 2); });
|
|
222
|
+
AMResolvedClass = AMSubclass(AVCaptureResolvedPhotoSettings.class, "AMPosterResolvedSettings");
|
|
223
|
+
AMReplace(AMResolvedClass, @selector(uniqueID), ^int64_t(id o) { return [objc_getAssociatedObject(o, &AMIDKey) longLongValue]; });
|
|
224
|
+
AMReplace(AMResolvedClass, @selector(photoDimensions), ^CMVideoDimensions(id o) { return (CMVideoDimensions){AMWidth, AMHeight}; });
|
|
225
|
+
AMReplace(AMResolvedClass, @selector(expectedPhotoCount), ^NSInteger(id o) { return 1; });
|
|
226
|
+
AMPhotoClass = AMSubclass(AVCapturePhoto.class, "AMPosterPhoto");
|
|
227
|
+
AMReplace(AMPhotoClass, @selector(fileDataRepresentation), ^id(id o) { return AMPNG; });
|
|
228
|
+
AMReplace(AMPhotoClass, @selector(CGImageRepresentation), ^CGImageRef(id o) { return AMPosterImage; });
|
|
229
|
+
AMReplace(AMPhotoClass, @selector(pixelBuffer), ^CVPixelBufferRef(id o) { return AMPixels; });
|
|
230
|
+
AMReplace(AMPhotoClass, @selector(metadata), ^id(id o) { return @{@"PixelWidth": @(AMWidth), @"PixelHeight": @(AMHeight)}; });
|
|
231
|
+
AMReplace(AMPhotoClass, @selector(resolvedSettings), ^id(id o) { return objc_getAssociatedObject(o, &AMResolvedKey); });
|
|
232
|
+
AMReplace(AMPhotoClass, @selector(photoCount), ^NSInteger(id o) { return 1; });
|
|
233
|
+
AMReplace(AMPhotoClass, @selector(timestamp), ^CMTime(id o) { return CMClockGetTime(CMClockGetHostTimeClock()); });
|
|
234
|
+
AMReplace(AMPhotoClass, @selector(isRawPhoto), ^BOOL(id o) { return NO; });
|
|
235
|
+
// Decode once; generated QR also goes through detection rather than echoing env.
|
|
236
|
+
CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:nil
|
|
237
|
+
options:@{CIDetectorAccuracy: CIDetectorAccuracyHigh}];
|
|
238
|
+
NSMutableArray *codes = [NSMutableArray array];
|
|
239
|
+
for (CIQRCodeFeature *feature in [detector featuresInImage:[CIImage imageWithCGImage:AMPosterImage]]) {
|
|
240
|
+
if (!feature.messageString) continue;
|
|
241
|
+
id code = class_createInstance(AMCodeClass, 0);
|
|
242
|
+
AMStore(code, &AMMessageKey, feature.messageString);
|
|
243
|
+
[codes addObject:code];
|
|
244
|
+
}
|
|
245
|
+
AMCodes = [codes copy];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
static void AMInstallDiscovery(void) {
|
|
249
|
+
Class cls = object_getClass(AVCaptureDevice.class);
|
|
250
|
+
IMP original = class_getMethodImplementation(cls, @selector(defaultDeviceWithMediaType:));
|
|
251
|
+
AMReplace(cls, @selector(defaultDeviceWithMediaType:), ^id(id o, AVMediaType media) {
|
|
252
|
+
return AMVideo(media) ? AMDevice : ((id (*)(id, SEL, id))original)(o, @selector(defaultDeviceWithMediaType:), media);
|
|
253
|
+
});
|
|
254
|
+
IMP devices = class_getMethodImplementation(cls, @selector(devicesWithMediaType:));
|
|
255
|
+
AMReplace(cls, @selector(devicesWithMediaType:), ^id(id o, AVMediaType media) {
|
|
256
|
+
return AMVideo(media) ? @[AMDevice] : ((id (*)(id, SEL, id))devices)(o, @selector(devicesWithMediaType:), media);
|
|
257
|
+
});
|
|
258
|
+
IMP typed = class_getMethodImplementation(cls, @selector(defaultDeviceWithDeviceType:mediaType:position:));
|
|
259
|
+
AMReplace(cls, @selector(defaultDeviceWithDeviceType:mediaType:position:),
|
|
260
|
+
^id(id o, AVCaptureDeviceType type, AVMediaType media, AVCaptureDevicePosition position) {
|
|
261
|
+
if (AMVideo(media)) return [type isEqual:AVCaptureDeviceTypeBuiltInWideAngleCamera] ? AMDevice : nil;
|
|
262
|
+
return ((id (*)(id, SEL, id, id, AVCaptureDevicePosition))typed)
|
|
263
|
+
(o, @selector(defaultDeviceWithDeviceType:mediaType:position:), type, media, position);
|
|
264
|
+
});
|
|
265
|
+
IMP auth = class_getMethodImplementation(cls, @selector(authorizationStatusForMediaType:));
|
|
266
|
+
AMReplace(cls, @selector(authorizationStatusForMediaType:), ^AVAuthorizationStatus(id o, AVMediaType media) {
|
|
267
|
+
return AMVideo(media) ? AVAuthorizationStatusAuthorized :
|
|
268
|
+
((AVAuthorizationStatus (*)(id, SEL, id))auth)(o, @selector(authorizationStatusForMediaType:), media);
|
|
269
|
+
});
|
|
270
|
+
IMP access = class_getMethodImplementation(cls, @selector(requestAccessForMediaType:completionHandler:));
|
|
271
|
+
AMReplace(cls, @selector(requestAccessForMediaType:completionHandler:), ^(id o, AVMediaType media, void (^handler)(BOOL)) {
|
|
272
|
+
if (AMVideo(media)) { if (handler) dispatch_async(dispatch_get_main_queue(), ^{ handler(YES); }); }
|
|
273
|
+
else ((void (*)(id, SEL, id, id))access)(o, @selector(requestAccessForMediaType:completionHandler:), media, handler);
|
|
274
|
+
});
|
|
275
|
+
Class discovery = object_getClass(AVCaptureDeviceDiscoverySession.class);
|
|
276
|
+
IMP factory = class_getMethodImplementation(discovery, @selector(discoverySessionWithDeviceTypes:mediaType:position:));
|
|
277
|
+
AMReplace(discovery, @selector(discoverySessionWithDeviceTypes:mediaType:position:),
|
|
278
|
+
^id(id o, NSArray *types, AVMediaType media, AVCaptureDevicePosition position) {
|
|
279
|
+
if (AMMatches(types, media)) return class_createInstance(AMDiscoveryClass, 0);
|
|
280
|
+
return ((id (*)(id, SEL, id, id, AVCaptureDevicePosition))factory)
|
|
281
|
+
(o, @selector(discoverySessionWithDeviceTypes:mediaType:position:), types, media, position);
|
|
282
|
+
});
|
|
283
|
+
AMExchange(AVCaptureDeviceInput.class, @selector(initWithDevice:error:), @selector(am_initWithDevice:error:));
|
|
284
|
+
AMReplace(object_getClass(AVCaptureDeviceInput.class), @selector(deviceInputWithDevice:error:),
|
|
285
|
+
^id(id o, AVCaptureDevice *device, NSError **error) { return [[AVCaptureDeviceInput alloc] initWithDevice:device error:error]; });
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
static BOOL AMCurrent(AMSessionState *s, NSUInteger generation) {
|
|
289
|
+
@synchronized (s) { return s.running && s.generation == generation; }
|
|
290
|
+
}
|
|
291
|
+
static void AMTick(AVCaptureSession *session, NSUInteger generation) {
|
|
292
|
+
AMSessionState *s = AMState(session);
|
|
293
|
+
NSArray *outputs, *layers;
|
|
294
|
+
BOOL metadataTick;
|
|
295
|
+
@synchronized (s) {
|
|
296
|
+
if (!s.running || s.generation != generation) return;
|
|
297
|
+
outputs = [s.outputs copy]; layers = s.layers.allObjects;
|
|
298
|
+
metadataTick = (s.frame++ % 8 == 0); // 8/15 s, approximately 500 ms.
|
|
299
|
+
}
|
|
300
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
301
|
+
if (!AMCurrent(s, generation)) return;
|
|
302
|
+
for (AVCaptureVideoPreviewLayer *layer in layers)
|
|
303
|
+
if (layer.session == session) layer.contents = (__bridge id)AMPosterImage;
|
|
304
|
+
});
|
|
305
|
+
for (AVCaptureOutput *output in outputs) {
|
|
306
|
+
AMOutputState *binding = AMOutput(output);
|
|
307
|
+
id delegate; dispatch_queue_t queue; AVCaptureConnection *connection;
|
|
308
|
+
@synchronized (binding) {
|
|
309
|
+
delegate = binding.delegate; queue = binding.queue;
|
|
310
|
+
if (delegate && queue && !binding.connection) {
|
|
311
|
+
binding.connection = class_createInstance(AMConnectionClass, 0);
|
|
312
|
+
AMStore(binding.connection, &AMOutputKey, output);
|
|
313
|
+
}
|
|
314
|
+
connection = binding.connection;
|
|
315
|
+
}
|
|
316
|
+
if (!delegate || !queue) continue;
|
|
317
|
+
if ([output isKindOfClass:AVCaptureVideoDataOutput.class] &&
|
|
318
|
+
[delegate respondsToSelector:@selector(captureOutput:didOutputSampleBuffer:fromConnection:)]) {
|
|
319
|
+
CMSampleTimingInfo timing = {CMTimeMake(1, 15), CMClockGetTime(CMClockGetHostTimeClock()), kCMTimeInvalid};
|
|
320
|
+
CMSampleBufferRef sample = NULL;
|
|
321
|
+
if (CMSampleBufferCreateReadyWithImageBuffer(kCFAllocatorDefault, AMPixels, AMFormat, &timing, &sample) != noErr) continue;
|
|
322
|
+
dispatch_async(queue, ^{
|
|
323
|
+
if (AMCurrent(s, generation) && binding.session == session)
|
|
324
|
+
[delegate captureOutput:output didOutputSampleBuffer:sample fromConnection:connection];
|
|
325
|
+
CFRelease(sample);
|
|
326
|
+
});
|
|
327
|
+
} else if (metadataTick && AMCodes.count && [output isKindOfClass:AVCaptureMetadataOutput.class] &&
|
|
328
|
+
[delegate respondsToSelector:@selector(captureOutput:didOutputMetadataObjects:fromConnection:)]) {
|
|
329
|
+
dispatch_async(queue, ^{
|
|
330
|
+
NSArray *types = objc_getAssociatedObject(output, &AMTypesKey);
|
|
331
|
+
if (AMCurrent(s, generation) && binding.session == session && [types containsObject:AVMetadataObjectTypeQRCode])
|
|
332
|
+
[delegate captureOutput:(AVCaptureMetadataOutput *)output didOutputMetadataObjects:AMCodes fromConnection:connection];
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
static void AMInstallSession(void) {
|
|
338
|
+
Class cls = AVCaptureSession.class;
|
|
339
|
+
AMReplace(cls, @selector(canAddInput:), ^BOOL(id o, AVCaptureInput *input) { return input != nil; });
|
|
340
|
+
AMReplace(cls, @selector(addInput:), ^(id o, AVCaptureInput *input) {
|
|
341
|
+
AMSessionState *s = AMState(o); @synchronized (s) { if (input && ![s.inputs containsObject:input]) [s.inputs addObject:input]; }
|
|
342
|
+
});
|
|
343
|
+
AMReplace(cls, @selector(removeInput:), ^(id o, AVCaptureInput *input) {
|
|
344
|
+
AMSessionState *s = AMState(o); @synchronized (s) { [s.inputs removeObject:input]; }
|
|
345
|
+
});
|
|
346
|
+
AMReplace(cls, @selector(inputs), ^id(id o) { AMSessionState *s = AMState(o); @synchronized (s) { return [s.inputs copy]; } });
|
|
347
|
+
AMReplace(cls, @selector(canAddOutput:), ^BOOL(id o, AVCaptureOutput *output) { return output != nil; });
|
|
348
|
+
AMReplace(cls, @selector(addOutput:), ^(AVCaptureSession *o, AVCaptureOutput *output) {
|
|
349
|
+
AMSessionState *s = AMState(o); @synchronized (s) {
|
|
350
|
+
if (output && ![s.outputs containsObject:output]) { [s.outputs addObject:output]; AMOutput(output).session = o; }
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
AMReplace(cls, @selector(removeOutput:), ^(id o, AVCaptureOutput *output) {
|
|
354
|
+
AMSessionState *s = AMState(o); @synchronized (s) { [s.outputs removeObject:output]; AMOutput(output).session = nil; }
|
|
355
|
+
});
|
|
356
|
+
AMReplace(cls, @selector(outputs), ^id(id o) { AMSessionState *s = AMState(o); @synchronized (s) { return [s.outputs copy]; } });
|
|
357
|
+
AMReplace(cls, @selector(beginConfiguration), ^(id o) {});
|
|
358
|
+
AMReplace(cls, @selector(commitConfiguration), ^(id o) {});
|
|
359
|
+
AMReplace(cls, @selector(setSessionPreset:), ^(id o, NSString *preset) {
|
|
360
|
+
AMSessionState *s = AMState(o); @synchronized (s) { s.preset = preset; }
|
|
361
|
+
});
|
|
362
|
+
AMReplace(cls, @selector(sessionPreset), ^id(id o) { AMSessionState *s = AMState(o); @synchronized (s) { return s.preset; } });
|
|
363
|
+
AMReplace(cls, @selector(canSetSessionPreset:), ^BOOL(id o, NSString *preset) { return YES; });
|
|
364
|
+
AMReplace(cls, @selector(isRunning), ^BOOL(id o) { AMSessionState *s = AMState(o); @synchronized (s) { return s.running; } });
|
|
365
|
+
AMReplace(cls, @selector(isInterrupted), ^BOOL(id o) { return NO; });
|
|
366
|
+
AMReplace(cls, @selector(startRunning), ^(AVCaptureSession *o) {
|
|
367
|
+
AMSessionState *s = AMState(o); @synchronized (s) {
|
|
368
|
+
if (s.running) return;
|
|
369
|
+
s.running = YES; s.frame = 0;
|
|
370
|
+
NSUInteger generation = ++s.generation;
|
|
371
|
+
__weak AVCaptureSession *weakSession = o;
|
|
372
|
+
s.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,
|
|
373
|
+
dispatch_queue_create("dev.automobile.camera-poster.frames", DISPATCH_QUEUE_SERIAL));
|
|
374
|
+
dispatch_source_set_timer(s.timer, DISPATCH_TIME_NOW, NSEC_PER_SEC / 15, NSEC_PER_MSEC * 3);
|
|
375
|
+
dispatch_source_set_event_handler(s.timer, ^{
|
|
376
|
+
@autoreleasepool { AVCaptureSession *session = weakSession; if (session) AMTick(session, generation); }
|
|
377
|
+
});
|
|
378
|
+
dispatch_resume(s.timer);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
AMReplace(cls, @selector(stopRunning), ^(AVCaptureSession *o) {
|
|
382
|
+
AMSessionState *s = AMState(o); NSArray *layers;
|
|
383
|
+
@synchronized (s) {
|
|
384
|
+
s.running = NO; ++s.generation;
|
|
385
|
+
if (s.timer) dispatch_source_cancel(s.timer);
|
|
386
|
+
s.timer = nil; layers = s.layers.allObjects;
|
|
387
|
+
}
|
|
388
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
389
|
+
for (AVCaptureVideoPreviewLayer *layer in layers)
|
|
390
|
+
if (layer.session == o && !o.isRunning) layer.contents = nil;
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
static void AMInstallPreviewAndOutputs(void) {
|
|
396
|
+
Class layer = AVCaptureVideoPreviewLayer.class;
|
|
397
|
+
AMExchange(layer, @selector(initWithSession:), @selector(am_initWithSession:));
|
|
398
|
+
AMReplace(object_getClass(layer), @selector(layerWithSession:), ^id(id o, AVCaptureSession *s) {
|
|
399
|
+
return [[AVCaptureVideoPreviewLayer alloc] initWithSession:s];
|
|
400
|
+
});
|
|
401
|
+
AMReplace(layer, @selector(setSession:), ^(AVCaptureVideoPreviewLayer *o, AVCaptureSession *s) { AMBindLayer(o, s); });
|
|
402
|
+
AMReplace(layer, @selector(session), ^id(id o) { return objc_getAssociatedObject(o, &AMSessionKey); });
|
|
403
|
+
AMReplace(layer, @selector(setVideoGravity:), ^(AVCaptureVideoPreviewLayer *o, AVLayerVideoGravity gravity) {
|
|
404
|
+
o.contentsGravity = [gravity isEqual:AVLayerVideoGravityResizeAspectFill] ? @"resizeAspectFill" :
|
|
405
|
+
([gravity isEqual:AVLayerVideoGravityResize] ? @"resize" : @"resizeAspect");
|
|
406
|
+
});
|
|
407
|
+
AMReplace(layer, @selector(videoGravity), ^id(AVCaptureVideoPreviewLayer *o) {
|
|
408
|
+
return [o.contentsGravity isEqual:@"resizeAspectFill"] ? AVLayerVideoGravityResizeAspectFill :
|
|
409
|
+
([o.contentsGravity isEqual:@"resize"] ? AVLayerVideoGravityResize : AVLayerVideoGravityResizeAspect);
|
|
410
|
+
});
|
|
411
|
+
AMReplace(AVCaptureVideoDataOutput.class, @selector(setSampleBufferDelegate:queue:),
|
|
412
|
+
^(id o, id delegate, dispatch_queue_t queue) {
|
|
413
|
+
AMOutputState *s = AMOutput(o); @synchronized (s) { s.delegate = delegate; s.queue = queue; }
|
|
414
|
+
});
|
|
415
|
+
AMReplace(AVCaptureMetadataOutput.class, @selector(setMetadataObjectsDelegate:queue:),
|
|
416
|
+
^(id o, id delegate, dispatch_queue_t queue) {
|
|
417
|
+
AMOutputState *s = AMOutput(o); @synchronized (s) { s.delegate = delegate; s.queue = queue; }
|
|
418
|
+
});
|
|
419
|
+
AMReplace(AVCaptureMetadataOutput.class, @selector(setMetadataObjectTypes:), ^(id o, NSArray *types) { AMStore(o, &AMTypesKey, [types copy]); });
|
|
420
|
+
AMReplace(AVCaptureMetadataOutput.class, @selector(metadataObjectTypes), ^id(id o) { return objc_getAssociatedObject(o, &AMTypesKey) ?: @[]; });
|
|
421
|
+
AMReplace(AVCaptureMetadataOutput.class, @selector(availableMetadataObjectTypes), ^id(id o) { return @[AVMetadataObjectTypeQRCode]; });
|
|
422
|
+
AMReplace(AVCapturePhotoOutput.class, @selector(connectionWithMediaType:), ^id(id o, AVMediaType type) { return nil; });
|
|
423
|
+
AMReplace(AVCapturePhotoOutput.class, @selector(capturePhotoWithSettings:delegate:),
|
|
424
|
+
^(AVCapturePhotoOutput *o, AVCapturePhotoSettings *settings, id<AVCapturePhotoCaptureDelegate> delegate) {
|
|
425
|
+
id resolved = class_createInstance(AMResolvedClass, 0);
|
|
426
|
+
AMStore(resolved, &AMIDKey, @(settings.uniqueID));
|
|
427
|
+
id photo = class_createInstance(AMPhotoClass, 0);
|
|
428
|
+
AMStore(photo, &AMResolvedKey, resolved);
|
|
429
|
+
AVCaptureSession *session = AMOutput(o).session;
|
|
430
|
+
NSError *error = session.isRunning ? nil : [NSError errorWithDomain:@"AMCameraPoster" code:1
|
|
431
|
+
userInfo:@{NSLocalizedDescriptionKey: @"Capture session is not running"}];
|
|
432
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
433
|
+
if ([delegate respondsToSelector:@selector(captureOutput:willBeginCaptureForResolvedSettings:)])
|
|
434
|
+
[delegate captureOutput:o willBeginCaptureForResolvedSettings:resolved];
|
|
435
|
+
if ([delegate respondsToSelector:@selector(captureOutput:didFinishProcessingPhoto:error:)])
|
|
436
|
+
[delegate captureOutput:o didFinishProcessingPhoto:photo error:error];
|
|
437
|
+
if ([delegate respondsToSelector:@selector(captureOutput:didFinishCaptureForResolvedSettings:error:)])
|
|
438
|
+
[delegate captureOutput:o didFinishCaptureForResolvedSettings:resolved error:error];
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
__attribute__((constructor)) static void AMActivate(void) {
|
|
444
|
+
@autoreleasepool {
|
|
445
|
+
NSDictionary *env = NSProcessInfo.processInfo.environment;
|
|
446
|
+
NSString *path = env[@"AM_CAMERA_POSTER_PATH"], *qr = env[@"AM_CAMERA_POSTER_QR"];
|
|
447
|
+
if (!path.length && !qr.length) return;
|
|
448
|
+
if (!AMLoadPoster(path, qr)) return; // Invalid path wins too: no QR fallback.
|
|
449
|
+
AMInstallObjects(); AMInstallDiscovery(); AMInstallSession(); AMInstallPreviewAndOutputs();
|
|
450
|
+
Class picker = object_getClass(UIImagePickerController.class);
|
|
451
|
+
IMP available = class_getMethodImplementation(picker, @selector(isSourceTypeAvailable:));
|
|
452
|
+
AMReplace(picker, @selector(isSourceTypeAvailable:), ^BOOL(id o, UIImagePickerControllerSourceType type) {
|
|
453
|
+
return type == UIImagePickerControllerSourceTypeCamera ||
|
|
454
|
+
((BOOL (*)(id, SEL, UIImagePickerControllerSourceType))available)(o, @selector(isSourceTypeAvailable:), type);
|
|
455
|
+
});
|
|
456
|
+
IMP media = class_getMethodImplementation(picker, @selector(availableMediaTypesForSourceType:));
|
|
457
|
+
AMReplace(picker, @selector(availableMediaTypesForSourceType:), ^id(id o, UIImagePickerControllerSourceType type) {
|
|
458
|
+
return type == UIImagePickerControllerSourceTypeCamera ? @[UTTypeImage.identifier] :
|
|
459
|
+
((id (*)(id, SEL, UIImagePickerControllerSourceType))media)(o, @selector(availableMediaTypesForSourceType:), type);
|
|
460
|
+
});
|
|
461
|
+
AMReplace(picker, @selector(isCameraDeviceAvailable:), ^BOOL(id o, UIImagePickerControllerCameraDevice device) { return YES; });
|
|
462
|
+
// Availability only: presenting/capturing with UIImagePickerController is
|
|
463
|
+
// outside this PoC. VisionKit/DataScanner hardware gates are not patched.
|
|
464
|
+
NSLog(@"[AMCameraPoster] active source=%@ size=%zux%zu", path.length ? @"path" : @"qr", AMWidth, AMHeight);
|
|
465
|
+
}
|
|
466
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaeawc/auto-mobile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.93",
|
|
4
4
|
"description": "Mobile device interaction automation via MCP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adb",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"dist",
|
|
34
34
|
"!dist/**/*.map",
|
|
35
35
|
"schemas",
|
|
36
|
-
"mcp-skills"
|
|
36
|
+
"mcp-skills",
|
|
37
|
+
"ios/CameraPosterInjection/Injection/CameraPosterInjection.m"
|
|
37
38
|
],
|
|
38
39
|
"main": "dist/src/index.js",
|
|
39
40
|
"publishConfig": {
|
|
@@ -216,11 +217,11 @@
|
|
|
216
217
|
"knip": "^6.0.0",
|
|
217
218
|
"kysely": "0.29.8",
|
|
218
219
|
"oxc-parser": "0.157.0",
|
|
219
|
-
"oxfmt": "0.
|
|
220
|
-
"oxlint": "1.
|
|
221
|
-
"oxlint-tsgolint": "7.0.
|
|
220
|
+
"oxfmt": "0.77.0",
|
|
221
|
+
"oxlint": "1.92.0",
|
|
222
|
+
"oxlint-tsgolint": "7.0.2006",
|
|
222
223
|
"pixelmatch": "^8.0.0",
|
|
223
|
-
"playwright-core": "1.
|
|
224
|
+
"playwright-core": "1.65.0",
|
|
224
225
|
"pngjs": "^7.0.0",
|
|
225
226
|
"qrcode-generator": "2.0.4",
|
|
226
227
|
"reflect-metadata": "^0.2.2",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Prototype icon selection
|
|
2
|
+
|
|
3
|
+
`prototype-icon-names.json` is the sorted, authoritative list of 300 supported Material icon names.
|
|
4
|
+
The selection retains 147 names from repository icon fields, fixtures, goldens, samples,
|
|
5
|
+
documentation examples, icon-specific tests, legacy iOS support and Compose references (including
|
|
6
|
+
AutoMirrored icons, Playground, Kotlin and Swift). It includes the complete 49-name Material core set, adding 12 names
|
|
7
|
+
beyond that evidence, and 141 common UI names spanning navigation, actions, communication, media,
|
|
8
|
+
content, toggles, status, social and commerce. Each name supports all five Material styles.
|
|
9
|
+
|
|
10
|
+
Edit this data, then run `bun scripts/prototype/generate-prototype-icon-names.ts` to update the
|
|
11
|
+
contract enum and the [allowed icon guide](../docs/using/prototype-icons.md). The contract drives
|
|
12
|
+
TypeScript and native validation, generated models, embedded Swift data and CtrlProxy's generated
|
|
13
|
+
R8 rules. Do not edit the derived enum or R8 rules independently. Run the model, render-contract,
|
|
14
|
+
iOS contract and iOS symbol generators, then `bash scripts/update-tool-definitions.sh --no-stage`.
|
|
15
|
+
The iOS symbol generator keeps the mapping and fallback partition in contract order; mappings
|
|
16
|
+
must follow the SF Symbol availability and restriction rules in `ios/prototype-agent/ICON-SYMBOLS.md`.
|