zhui-plus 1.0.0 → 1.0.10
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/Heatmap.js +689 -0
- package/dist/WSPlayer/PlaySDKInterface.js +1 -0
- package/dist/WSPlayer/WSPlayer.js +1 -0
- package/dist/WSPlayer/audioTalkWorker.js +1 -0
- package/dist/WSPlayer/commonThread/libH264Enc.js +21 -0
- package/dist/WSPlayer/commonThread/libH264Enc.wasm +0 -0
- package/dist/WSPlayer/commonThread/libIVSDrawer.js +21 -0
- package/dist/WSPlayer/commonThread/libIVSDrawer.wasm +0 -0
- package/dist/WSPlayer/commonThread/libRenderEngine.js +21 -0
- package/dist/WSPlayer/commonThread/libRenderEngine.wasm +0 -0
- package/dist/WSPlayer/commonThread/libmavasp_litepacket.data +50 -0
- package/dist/WSPlayer/commonThread/libmavasp_litepacket.js +21 -0
- package/dist/WSPlayer/commonThread/libmavasp_litepacket.wasm +0 -0
- package/dist/WSPlayer/icon/IotComboBackGround-alarm.png +0 -0
- package/dist/WSPlayer/icon/IotComboBackGround.png +0 -0
- package/dist/WSPlayer/icon/RecordHover.svg +13 -0
- package/dist/WSPlayer/icon/RecordNormal.svg +13 -0
- package/dist/WSPlayer/icon/Recording.svg +15 -0
- package/dist/WSPlayer/icon/arrow-b.svg +9 -0
- package/dist/WSPlayer/icon/arrow-l.svg +9 -0
- package/dist/WSPlayer/icon/arrow-lb.svg +10 -0
- package/dist/WSPlayer/icon/arrow-lt.svg +10 -0
- package/dist/WSPlayer/icon/arrow-r.svg +9 -0
- package/dist/WSPlayer/icon/arrow-rb.svg +10 -0
- package/dist/WSPlayer/icon/arrow-rt.svg +10 -0
- package/dist/WSPlayer/icon/arrow-t.svg +9 -0
- package/dist/WSPlayer/icon/close-all-hover.svg +18 -0
- package/dist/WSPlayer/icon/close-all.svg +18 -0
- package/dist/WSPlayer/icon/close.svg +16 -0
- package/dist/WSPlayer/icon/close_hover.svg +16 -0
- package/dist/WSPlayer/icon/default.png +0 -0
- package/dist/WSPlayer/icon/draw-triangle_off.svg +14 -0
- package/dist/WSPlayer/icon/draw-triangle_off_hover.svg +14 -0
- package/dist/WSPlayer/icon/draw-triangle_on.svg +15 -0
- package/dist/WSPlayer/icon/draw-triangle_on_hover.svg +15 -0
- package/dist/WSPlayer/icon/drops.png +0 -0
- package/dist/WSPlayer/icon/fullscreen-hover.svg +13 -0
- package/dist/WSPlayer/icon/fullscreen.svg +13 -0
- package/dist/WSPlayer/icon/hide-pantilt-on.svg +13 -0
- package/dist/WSPlayer/icon/hide-pantilt.svg +13 -0
- package/dist/WSPlayer/icon/mobile-speed-control-icon.svg +13 -0
- package/dist/WSPlayer/icon/more.svg +13 -0
- package/dist/WSPlayer/icon/play-h.png +0 -0
- package/dist/WSPlayer/icon/play-n.png +0 -0
- package/dist/WSPlayer/icon/play-p.png +0 -0
- package/dist/WSPlayer/icon/ptz-icon1.svg +4 -0
- package/dist/WSPlayer/icon/ptz-icon2.svg +13 -0
- package/dist/WSPlayer/icon/ptz-icon3.svg +10 -0
- package/dist/WSPlayer/icon/ptz-icon4.svg +10 -0
- package/dist/WSPlayer/icon/ptz-icon5.svg +12 -0
- package/dist/WSPlayer/icon/ptz-icon6.svg +14 -0
- package/dist/WSPlayer/icon/ptz-select-hover.svg +3 -0
- package/dist/WSPlayer/icon/ptz-select.svg +3 -0
- package/dist/WSPlayer/icon/record_pause.svg +5 -0
- package/dist/WSPlayer/icon/record_play.svg +5 -0
- package/dist/WSPlayer/icon/refresh-replay.svg +11 -0
- package/dist/WSPlayer/icon/refresh-replay_hover.svg +11 -0
- package/dist/WSPlayer/icon/screen-more-icon.svg +15 -0
- package/dist/WSPlayer/icon/screen_1.svg +11 -0
- package/dist/WSPlayer/icon/screen_16.svg +18 -0
- package/dist/WSPlayer/icon/screen_16_hover.svg +18 -0
- package/dist/WSPlayer/icon/screen_1_hover.svg +11 -0
- package/dist/WSPlayer/icon/screen_2.svg +18 -0
- package/dist/WSPlayer/icon/screen_25.svg +19 -0
- package/dist/WSPlayer/icon/screen_25_hover.svg +19 -0
- package/dist/WSPlayer/icon/screen_2_hover.svg +18 -0
- package/dist/WSPlayer/icon/screen_3.svg +13 -0
- package/dist/WSPlayer/icon/screen_3_hover.svg +13 -0
- package/dist/WSPlayer/icon/screen_4.svg +12 -0
- package/dist/WSPlayer/icon/screen_4_hover.svg +12 -0
- package/dist/WSPlayer/icon/screen_6.svg +16 -0
- package/dist/WSPlayer/icon/screen_6_hover.svg +16 -0
- package/dist/WSPlayer/icon/screen_8.svg +18 -0
- package/dist/WSPlayer/icon/screen_8_hover.svg +18 -0
- package/dist/WSPlayer/icon/screen_9.svg +17 -0
- package/dist/WSPlayer/icon/screen_9_hover.svg +17 -0
- package/dist/WSPlayer/icon/screen_custom_division.svg +9 -0
- package/dist/WSPlayer/icon/screen_custom_division_hover.svg +9 -0
- package/dist/WSPlayer/icon/screen_custom_division_merge.svg +3 -0
- package/dist/WSPlayer/icon/screen_custom_division_split.svg +6 -0
- package/dist/WSPlayer/icon/snapshot.svg +38 -0
- package/dist/WSPlayer/icon/snapshot_hover.svg +38 -0
- package/dist/WSPlayer/icon/speed_left.svg +15 -0
- package/dist/WSPlayer/icon/speed_right.svg +15 -0
- package/dist/WSPlayer/icon/spread.png +0 -0
- package/dist/WSPlayer/icon/tag-left-alarm.png +0 -0
- package/dist/WSPlayer/icon/tag-left-normal.png +0 -0
- package/dist/WSPlayer/icon/tag-middle-alarm.png +0 -0
- package/dist/WSPlayer/icon/tag-middle-normal.png +0 -0
- package/dist/WSPlayer/icon/tag-right-alarm.png +0 -0
- package/dist/WSPlayer/icon/tag-right-normal.png +0 -0
- package/dist/WSPlayer/icon/talk-off-hover.svg +11 -0
- package/dist/WSPlayer/icon/talk-off.svg +11 -0
- package/dist/WSPlayer/icon/talk-on.svg +9 -0
- package/dist/WSPlayer/icon/voice-have.svg +43 -0
- package/dist/WSPlayer/icon/voice-have_hover.svg +43 -0
- package/dist/WSPlayer/icon/voice-null.svg +38 -0
- package/dist/WSPlayer/icon/voice-null_hover.svg +38 -0
- package/dist/WSPlayer/icon/ws-ctrl-ellipsis-hover.svg +14 -0
- package/dist/WSPlayer/icon/ws-ctrl-ellipsis.svg +14 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-b-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-l-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-lb-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-lt-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-r-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-rb-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-rt-bg.png +0 -0
- package/dist/WSPlayer/icon/wsplayer-mobile-pantilt-t-bg.png +0 -0
- package/dist/WSPlayer/jquery-3.6.0.min.js +2 -0
- package/dist/WSPlayer/multiThread/libStreamClient.js +21 -0
- package/dist/WSPlayer/multiThread/libStreamClient.wasm +0 -0
- package/dist/WSPlayer/multiThread/libStreamClient.worker.js +1 -0
- package/dist/WSPlayer/multiThread/libplay.data +0 -0
- package/dist/WSPlayer/multiThread/libplay.js +1 -0
- package/dist/WSPlayer/multiThread/libplay.wasm +0 -0
- package/dist/WSPlayer/multiThread/libplay.worker.js +1 -0
- package/dist/WSPlayer/player.css +1490 -0
- package/dist/WSPlayer/singleThread/VideoDecodeWorker.js +1439 -0
- package/dist/WSPlayer/singleThread/libStreamClient.js +21 -0
- package/dist/WSPlayer/singleThread/libStreamClient.wasm +0 -0
- package/dist/WSPlayer/singleThread/libplay.data +0 -0
- package/dist/WSPlayer/singleThread/libplay.js +1 -0
- package/dist/WSPlayer/singleThread/libplay.wasm +0 -0
- package/dist/WSPlayer/window.division.css +80 -0
- package/dist/index.js +467 -0
- package/dist/locale/af.js +193 -0
- package/dist/locale/af.min.js +3 -0
- package/dist/locale/af.min.js.map +1 -0
- package/dist/locale/af.min.mjs +3 -0
- package/dist/locale/af.min.mjs.map +1 -0
- package/dist/locale/af.mjs +186 -0
- package/dist/locale/ar-eg.js +193 -0
- package/dist/locale/ar-eg.min.js +3 -0
- package/dist/locale/ar-eg.min.js.map +1 -0
- package/dist/locale/ar-eg.min.mjs +3 -0
- package/dist/locale/ar-eg.min.mjs.map +1 -0
- package/dist/locale/ar-eg.mjs +186 -0
- package/dist/locale/ar.js +193 -0
- package/dist/locale/ar.min.js +3 -0
- package/dist/locale/ar.min.js.map +1 -0
- package/dist/locale/ar.min.mjs +3 -0
- package/dist/locale/ar.min.mjs.map +1 -0
- package/dist/locale/ar.mjs +186 -0
- package/dist/locale/az.js +194 -0
- package/dist/locale/az.min.js +3 -0
- package/dist/locale/az.min.js.map +1 -0
- package/dist/locale/az.min.mjs +3 -0
- package/dist/locale/az.min.mjs.map +1 -0
- package/dist/locale/az.mjs +187 -0
- package/dist/locale/bg.js +193 -0
- package/dist/locale/bg.min.js +3 -0
- package/dist/locale/bg.min.js.map +1 -0
- package/dist/locale/bg.min.mjs +3 -0
- package/dist/locale/bg.min.mjs.map +1 -0
- package/dist/locale/bg.mjs +186 -0
- package/dist/locale/bn.js +193 -0
- package/dist/locale/bn.min.js +3 -0
- package/dist/locale/bn.min.js.map +1 -0
- package/dist/locale/bn.min.mjs +3 -0
- package/dist/locale/bn.min.mjs.map +1 -0
- package/dist/locale/bn.mjs +186 -0
- package/dist/locale/ca.js +193 -0
- package/dist/locale/ca.min.js +3 -0
- package/dist/locale/ca.min.js.map +1 -0
- package/dist/locale/ca.min.mjs +3 -0
- package/dist/locale/ca.min.mjs.map +1 -0
- package/dist/locale/ca.mjs +186 -0
- package/dist/locale/ckb.js +193 -0
- package/dist/locale/ckb.min.js +3 -0
- package/dist/locale/ckb.min.js.map +1 -0
- package/dist/locale/ckb.min.mjs +3 -0
- package/dist/locale/ckb.min.mjs.map +1 -0
- package/dist/locale/ckb.mjs +186 -0
- package/dist/locale/cs.js +195 -0
- package/dist/locale/cs.min.js +3 -0
- package/dist/locale/cs.min.js.map +1 -0
- package/dist/locale/cs.min.mjs +3 -0
- package/dist/locale/cs.min.mjs.map +1 -0
- package/dist/locale/cs.mjs +188 -0
- package/dist/locale/da.js +193 -0
- package/dist/locale/da.min.js +3 -0
- package/dist/locale/da.min.js.map +1 -0
- package/dist/locale/da.min.mjs +3 -0
- package/dist/locale/da.min.mjs.map +1 -0
- package/dist/locale/da.mjs +186 -0
- package/dist/locale/de.js +195 -0
- package/dist/locale/de.min.js +3 -0
- package/dist/locale/de.min.js.map +1 -0
- package/dist/locale/de.min.mjs +3 -0
- package/dist/locale/de.min.mjs.map +1 -0
- package/dist/locale/de.mjs +188 -0
- package/dist/locale/el.js +193 -0
- package/dist/locale/el.min.js +3 -0
- package/dist/locale/el.min.js.map +1 -0
- package/dist/locale/el.min.mjs +3 -0
- package/dist/locale/el.min.mjs.map +1 -0
- package/dist/locale/el.mjs +186 -0
- package/dist/locale/en.js +193 -0
- package/dist/locale/en.min.js +3 -0
- package/dist/locale/en.min.js.map +1 -0
- package/dist/locale/en.min.mjs +3 -0
- package/dist/locale/en.min.mjs.map +1 -0
- package/dist/locale/en.mjs +186 -0
- package/dist/locale/eo.js +193 -0
- package/dist/locale/eo.min.js +3 -0
- package/dist/locale/eo.min.js.map +1 -0
- package/dist/locale/eo.min.mjs +3 -0
- package/dist/locale/eo.min.mjs.map +1 -0
- package/dist/locale/eo.mjs +186 -0
- package/dist/locale/es.js +193 -0
- package/dist/locale/es.min.js +3 -0
- package/dist/locale/es.min.js.map +1 -0
- package/dist/locale/es.min.mjs +3 -0
- package/dist/locale/es.min.mjs.map +1 -0
- package/dist/locale/es.mjs +186 -0
- package/dist/locale/et.js +193 -0
- package/dist/locale/et.min.js +3 -0
- package/dist/locale/et.min.js.map +1 -0
- package/dist/locale/et.min.mjs +3 -0
- package/dist/locale/et.min.mjs.map +1 -0
- package/dist/locale/et.mjs +186 -0
- package/dist/locale/eu.js +193 -0
- package/dist/locale/eu.min.js +3 -0
- package/dist/locale/eu.min.js.map +1 -0
- package/dist/locale/eu.min.mjs +3 -0
- package/dist/locale/eu.min.mjs.map +1 -0
- package/dist/locale/eu.mjs +186 -0
- package/dist/locale/fa.js +193 -0
- package/dist/locale/fa.min.js +3 -0
- package/dist/locale/fa.min.js.map +1 -0
- package/dist/locale/fa.min.mjs +3 -0
- package/dist/locale/fa.min.mjs.map +1 -0
- package/dist/locale/fa.mjs +186 -0
- package/dist/locale/fi.js +193 -0
- package/dist/locale/fi.min.js +3 -0
- package/dist/locale/fi.min.js.map +1 -0
- package/dist/locale/fi.min.mjs +3 -0
- package/dist/locale/fi.min.mjs.map +1 -0
- package/dist/locale/fi.mjs +186 -0
- package/dist/locale/fr.js +193 -0
- package/dist/locale/fr.min.js +3 -0
- package/dist/locale/fr.min.js.map +1 -0
- package/dist/locale/fr.min.mjs +3 -0
- package/dist/locale/fr.min.mjs.map +1 -0
- package/dist/locale/fr.mjs +186 -0
- package/dist/locale/he.js +193 -0
- package/dist/locale/he.min.js +3 -0
- package/dist/locale/he.min.js.map +1 -0
- package/dist/locale/he.min.mjs +3 -0
- package/dist/locale/he.min.mjs.map +1 -0
- package/dist/locale/he.mjs +186 -0
- package/dist/locale/hi.js +193 -0
- package/dist/locale/hi.min.js +3 -0
- package/dist/locale/hi.min.js.map +1 -0
- package/dist/locale/hi.min.mjs +3 -0
- package/dist/locale/hi.min.mjs.map +1 -0
- package/dist/locale/hi.mjs +186 -0
- package/dist/locale/hr.js +193 -0
- package/dist/locale/hr.min.js +3 -0
- package/dist/locale/hr.min.js.map +1 -0
- package/dist/locale/hr.min.mjs +3 -0
- package/dist/locale/hr.min.mjs.map +1 -0
- package/dist/locale/hr.mjs +186 -0
- package/dist/locale/hu.js +193 -0
- package/dist/locale/hu.min.js +3 -0
- package/dist/locale/hu.min.js.map +1 -0
- package/dist/locale/hu.min.mjs +3 -0
- package/dist/locale/hu.min.mjs.map +1 -0
- package/dist/locale/hu.mjs +186 -0
- package/dist/locale/hy-am.js +193 -0
- package/dist/locale/hy-am.min.js +3 -0
- package/dist/locale/hy-am.min.js.map +1 -0
- package/dist/locale/hy-am.min.mjs +3 -0
- package/dist/locale/hy-am.min.mjs.map +1 -0
- package/dist/locale/hy-am.mjs +186 -0
- package/dist/locale/id.js +193 -0
- package/dist/locale/id.min.js +3 -0
- package/dist/locale/id.min.js.map +1 -0
- package/dist/locale/id.min.mjs +3 -0
- package/dist/locale/id.min.mjs.map +1 -0
- package/dist/locale/id.mjs +186 -0
- package/dist/locale/it.js +193 -0
- package/dist/locale/it.min.js +3 -0
- package/dist/locale/it.min.js.map +1 -0
- package/dist/locale/it.min.mjs +3 -0
- package/dist/locale/it.min.mjs.map +1 -0
- package/dist/locale/it.mjs +186 -0
- package/dist/locale/ja.js +193 -0
- package/dist/locale/ja.min.js +3 -0
- package/dist/locale/ja.min.js.map +1 -0
- package/dist/locale/ja.min.mjs +3 -0
- package/dist/locale/ja.min.mjs.map +1 -0
- package/dist/locale/ja.mjs +186 -0
- package/dist/locale/kk.js +193 -0
- package/dist/locale/kk.min.js +3 -0
- package/dist/locale/kk.min.js.map +1 -0
- package/dist/locale/kk.min.mjs +3 -0
- package/dist/locale/kk.min.mjs.map +1 -0
- package/dist/locale/kk.mjs +186 -0
- package/dist/locale/km.js +193 -0
- package/dist/locale/km.min.js +3 -0
- package/dist/locale/km.min.js.map +1 -0
- package/dist/locale/km.min.mjs +3 -0
- package/dist/locale/km.min.mjs.map +1 -0
- package/dist/locale/km.mjs +186 -0
- package/dist/locale/ko.js +193 -0
- package/dist/locale/ko.min.js +3 -0
- package/dist/locale/ko.min.js.map +1 -0
- package/dist/locale/ko.min.mjs +3 -0
- package/dist/locale/ko.min.mjs.map +1 -0
- package/dist/locale/ko.mjs +186 -0
- package/dist/locale/ku.js +193 -0
- package/dist/locale/ku.min.js +3 -0
- package/dist/locale/ku.min.js.map +1 -0
- package/dist/locale/ku.min.mjs +3 -0
- package/dist/locale/ku.min.mjs.map +1 -0
- package/dist/locale/ku.mjs +186 -0
- package/dist/locale/ky.js +193 -0
- package/dist/locale/ky.min.js +3 -0
- package/dist/locale/ky.min.js.map +1 -0
- package/dist/locale/ky.min.mjs +3 -0
- package/dist/locale/ky.min.mjs.map +1 -0
- package/dist/locale/ky.mjs +186 -0
- package/dist/locale/lo.js +193 -0
- package/dist/locale/lo.min.js +3 -0
- package/dist/locale/lo.min.js.map +1 -0
- package/dist/locale/lo.min.mjs +3 -0
- package/dist/locale/lo.min.mjs.map +1 -0
- package/dist/locale/lo.mjs +186 -0
- package/dist/locale/lt.js +193 -0
- package/dist/locale/lt.min.js +3 -0
- package/dist/locale/lt.min.js.map +1 -0
- package/dist/locale/lt.min.mjs +3 -0
- package/dist/locale/lt.min.mjs.map +1 -0
- package/dist/locale/lt.mjs +186 -0
- package/dist/locale/lv.js +193 -0
- package/dist/locale/lv.min.js +3 -0
- package/dist/locale/lv.min.js.map +1 -0
- package/dist/locale/lv.min.mjs +3 -0
- package/dist/locale/lv.min.mjs.map +1 -0
- package/dist/locale/lv.mjs +186 -0
- package/dist/locale/mg.js +193 -0
- package/dist/locale/mg.min.js +3 -0
- package/dist/locale/mg.min.js.map +1 -0
- package/dist/locale/mg.min.mjs +3 -0
- package/dist/locale/mg.min.mjs.map +1 -0
- package/dist/locale/mg.mjs +186 -0
- package/dist/locale/mn.js +193 -0
- package/dist/locale/mn.min.js +3 -0
- package/dist/locale/mn.min.js.map +1 -0
- package/dist/locale/mn.min.mjs +3 -0
- package/dist/locale/mn.min.mjs.map +1 -0
- package/dist/locale/mn.mjs +186 -0
- package/dist/locale/ms.js +195 -0
- package/dist/locale/ms.min.js +3 -0
- package/dist/locale/ms.min.js.map +1 -0
- package/dist/locale/ms.min.mjs +3 -0
- package/dist/locale/ms.min.mjs.map +1 -0
- package/dist/locale/ms.mjs +188 -0
- package/dist/locale/my.js +193 -0
- package/dist/locale/my.min.js +3 -0
- package/dist/locale/my.min.js.map +1 -0
- package/dist/locale/my.min.mjs +3 -0
- package/dist/locale/my.min.mjs.map +1 -0
- package/dist/locale/my.mjs +186 -0
- package/dist/locale/nb-no.js +193 -0
- package/dist/locale/nb-no.min.js +3 -0
- package/dist/locale/nb-no.min.js.map +1 -0
- package/dist/locale/nb-no.min.mjs +3 -0
- package/dist/locale/nb-no.min.mjs.map +1 -0
- package/dist/locale/nb-no.mjs +186 -0
- package/dist/locale/nl.js +193 -0
- package/dist/locale/nl.min.js +3 -0
- package/dist/locale/nl.min.js.map +1 -0
- package/dist/locale/nl.min.mjs +3 -0
- package/dist/locale/nl.min.mjs.map +1 -0
- package/dist/locale/nl.mjs +186 -0
- package/dist/locale/no.js +193 -0
- package/dist/locale/no.min.js +3 -0
- package/dist/locale/no.min.js.map +1 -0
- package/dist/locale/no.min.mjs +3 -0
- package/dist/locale/no.min.mjs.map +1 -0
- package/dist/locale/no.mjs +186 -0
- package/dist/locale/pa.js +193 -0
- package/dist/locale/pa.min.js +3 -0
- package/dist/locale/pa.min.js.map +1 -0
- package/dist/locale/pa.min.mjs +3 -0
- package/dist/locale/pa.min.mjs.map +1 -0
- package/dist/locale/pa.mjs +186 -0
- package/dist/locale/pl.js +193 -0
- package/dist/locale/pl.min.js +3 -0
- package/dist/locale/pl.min.js.map +1 -0
- package/dist/locale/pl.min.mjs +3 -0
- package/dist/locale/pl.min.mjs.map +1 -0
- package/dist/locale/pl.mjs +186 -0
- package/dist/locale/pt-br.js +193 -0
- package/dist/locale/pt-br.min.js +3 -0
- package/dist/locale/pt-br.min.js.map +1 -0
- package/dist/locale/pt-br.min.mjs +3 -0
- package/dist/locale/pt-br.min.mjs.map +1 -0
- package/dist/locale/pt-br.mjs +186 -0
- package/dist/locale/pt.js +193 -0
- package/dist/locale/pt.min.js +3 -0
- package/dist/locale/pt.min.js.map +1 -0
- package/dist/locale/pt.min.mjs +3 -0
- package/dist/locale/pt.min.mjs.map +1 -0
- package/dist/locale/pt.mjs +186 -0
- package/dist/locale/ro.js +193 -0
- package/dist/locale/ro.min.js +3 -0
- package/dist/locale/ro.min.js.map +1 -0
- package/dist/locale/ro.min.mjs +3 -0
- package/dist/locale/ro.min.mjs.map +1 -0
- package/dist/locale/ro.mjs +186 -0
- package/dist/locale/ru.js +193 -0
- package/dist/locale/ru.min.js +3 -0
- package/dist/locale/ru.min.js.map +1 -0
- package/dist/locale/ru.min.mjs +3 -0
- package/dist/locale/ru.min.mjs.map +1 -0
- package/dist/locale/ru.mjs +186 -0
- package/dist/locale/sk.js +195 -0
- package/dist/locale/sk.min.js +3 -0
- package/dist/locale/sk.min.js.map +1 -0
- package/dist/locale/sk.min.mjs +3 -0
- package/dist/locale/sk.min.mjs.map +1 -0
- package/dist/locale/sk.mjs +188 -0
- package/dist/locale/sl.js +193 -0
- package/dist/locale/sl.min.js +3 -0
- package/dist/locale/sl.min.js.map +1 -0
- package/dist/locale/sl.min.mjs +3 -0
- package/dist/locale/sl.min.mjs.map +1 -0
- package/dist/locale/sl.mjs +186 -0
- package/dist/locale/sr.js +193 -0
- package/dist/locale/sr.min.js +3 -0
- package/dist/locale/sr.min.js.map +1 -0
- package/dist/locale/sr.min.mjs +3 -0
- package/dist/locale/sr.min.mjs.map +1 -0
- package/dist/locale/sr.mjs +186 -0
- package/dist/locale/sv.js +193 -0
- package/dist/locale/sv.min.js +3 -0
- package/dist/locale/sv.min.js.map +1 -0
- package/dist/locale/sv.min.mjs +3 -0
- package/dist/locale/sv.min.mjs.map +1 -0
- package/dist/locale/sv.mjs +186 -0
- package/dist/locale/sw.js +193 -0
- package/dist/locale/sw.min.js +3 -0
- package/dist/locale/sw.min.js.map +1 -0
- package/dist/locale/sw.min.mjs +3 -0
- package/dist/locale/sw.min.mjs.map +1 -0
- package/dist/locale/sw.mjs +186 -0
- package/dist/locale/ta.js +193 -0
- package/dist/locale/ta.min.js +3 -0
- package/dist/locale/ta.min.js.map +1 -0
- package/dist/locale/ta.min.mjs +3 -0
- package/dist/locale/ta.min.mjs.map +1 -0
- package/dist/locale/ta.mjs +186 -0
- package/dist/locale/te.js +193 -0
- package/dist/locale/te.min.js +3 -0
- package/dist/locale/te.min.js.map +1 -0
- package/dist/locale/te.min.mjs +3 -0
- package/dist/locale/te.min.mjs.map +1 -0
- package/dist/locale/te.mjs +186 -0
- package/dist/locale/th.js +193 -0
- package/dist/locale/th.min.js +3 -0
- package/dist/locale/th.min.js.map +1 -0
- package/dist/locale/th.min.mjs +3 -0
- package/dist/locale/th.min.mjs.map +1 -0
- package/dist/locale/th.mjs +186 -0
- package/dist/locale/tk.js +193 -0
- package/dist/locale/tk.min.js +3 -0
- package/dist/locale/tk.min.js.map +1 -0
- package/dist/locale/tk.min.mjs +3 -0
- package/dist/locale/tk.min.mjs.map +1 -0
- package/dist/locale/tk.mjs +186 -0
- package/dist/locale/tr.js +193 -0
- package/dist/locale/tr.min.js +3 -0
- package/dist/locale/tr.min.js.map +1 -0
- package/dist/locale/tr.min.mjs +3 -0
- package/dist/locale/tr.min.mjs.map +1 -0
- package/dist/locale/tr.mjs +186 -0
- package/dist/locale/ug-cn.js +193 -0
- package/dist/locale/ug-cn.min.js +3 -0
- package/dist/locale/ug-cn.min.js.map +1 -0
- package/dist/locale/ug-cn.min.mjs +3 -0
- package/dist/locale/ug-cn.min.mjs.map +1 -0
- package/dist/locale/ug-cn.mjs +186 -0
- package/dist/locale/uk.js +193 -0
- package/dist/locale/uk.min.js +3 -0
- package/dist/locale/uk.min.js.map +1 -0
- package/dist/locale/uk.min.mjs +3 -0
- package/dist/locale/uk.min.mjs.map +1 -0
- package/dist/locale/uk.mjs +186 -0
- package/dist/locale/uz-uz.js +193 -0
- package/dist/locale/uz-uz.min.js +3 -0
- package/dist/locale/uz-uz.min.js.map +1 -0
- package/dist/locale/uz-uz.min.mjs +3 -0
- package/dist/locale/uz-uz.min.mjs.map +1 -0
- package/dist/locale/uz-uz.mjs +186 -0
- package/dist/locale/vi.js +193 -0
- package/dist/locale/vi.min.js +3 -0
- package/dist/locale/vi.min.js.map +1 -0
- package/dist/locale/vi.min.mjs +3 -0
- package/dist/locale/vi.min.mjs.map +1 -0
- package/dist/locale/vi.mjs +186 -0
- package/dist/locale/zh-cn.js +193 -0
- package/dist/locale/zh-cn.min.js +3 -0
- package/dist/locale/zh-cn.min.js.map +1 -0
- package/dist/locale/zh-cn.min.mjs +3 -0
- package/dist/locale/zh-cn.min.mjs.map +1 -0
- package/dist/locale/zh-cn.mjs +186 -0
- package/dist/locale/zh-hk.js +193 -0
- package/dist/locale/zh-hk.min.js +3 -0
- package/dist/locale/zh-hk.min.js.map +1 -0
- package/dist/locale/zh-hk.min.mjs +3 -0
- package/dist/locale/zh-hk.min.mjs.map +1 -0
- package/dist/locale/zh-hk.mjs +186 -0
- package/dist/locale/zh-mo.js +193 -0
- package/dist/locale/zh-mo.min.js +3 -0
- package/dist/locale/zh-mo.min.js.map +1 -0
- package/dist/locale/zh-mo.min.mjs +3 -0
- package/dist/locale/zh-mo.min.mjs.map +1 -0
- package/dist/locale/zh-mo.mjs +186 -0
- package/dist/locale/zh-tw.js +193 -0
- package/dist/locale/zh-tw.min.js +3 -0
- package/dist/locale/zh-tw.min.js.map +1 -0
- package/dist/locale/zh-tw.min.mjs +3 -0
- package/dist/locale/zh-tw.min.mjs.map +1 -0
- package/dist/locale/zh-tw.mjs +186 -0
- package/dist/style.css +1 -1
- package/dist/test/demo.docx +0 -0
- package/dist/test/demo.et +0 -0
- package/dist/test/demo.ofd +0 -0
- package/dist/test/demo.pdf +0 -0
- package/dist/test/test.ofd +0 -0
- package/dist/test/unzip.ofd +0 -0
- package/dist/test/zip.ofd +0 -0
- package/dist/types/auto-imports.d.ts +9 -0
- package/dist/types/components.d.ts +55 -0
- package/dist/zhui-plus.cjs.js +1 -0
- package/dist/zhui-plus.es.js +2 -0
- package/dist/zhui.svg +1 -0
- package/package.json +90 -4
- package/packages/components/AI/index.ts +10 -0
- package/packages/components/AI/src/zh-aiChat.vue +841 -0
- package/packages/components/badge/__tests__/badge.test.ts +38 -0
- package/packages/components/badge/index.ts +10 -0
- package/packages/components/badge/src/zh-badge.vue +86 -0
- package/packages/components/badge/style.scss +1 -0
- package/packages/components/button/__tests__/button.test.ts +94 -0
- package/packages/components/button/__tests__/buttonGroup.test.ts +46 -0
- package/packages/components/button/index.ts +11 -0
- package/packages/components/button/src/zh-button-group.vue +50 -0
- package/packages/components/button/src/zh-button.vue +152 -0
- package/packages/components/button/style/index.css +140 -0
- package/packages/components/charts/geo.json +11147 -0
- package/packages/components/charts/index.ts +35 -0
- package/packages/components/charts/src/zh-barChart.vue +97 -0
- package/packages/components/charts/src/zh-baseChart.vue +196 -0
- package/packages/components/charts/src/zh-lineBarChart.vue +113 -0
- package/packages/components/charts/src/zh-lineChart.vue +93 -0
- package/packages/components/charts/src/zh-mapChart.vue +214 -0
- package/packages/components/charts/src/zh-pictorialBar.vue +72 -0
- package/packages/components/charts/src/zh-pieChart.vue +67 -0
- package/packages/components/charts/src/zh-radarChart.vue +131 -0
- package/packages/components/charts/src/zh-scatterChart.vue +152 -0
- package/packages/components/chat/index.ts +10 -0
- package/packages/components/chat/src/zh-chat.vue +889 -0
- package/packages/components/container/index.ts +18 -0
- package/packages/components/container/src/zh-aside.vue +34 -0
- package/packages/components/container/src/zh-container.vue +45 -0
- package/packages/components/container/src/zh-footer.vue +33 -0
- package/packages/components/container/src/zh-header.vue +34 -0
- package/packages/components/container/src/zh-main.vue +26 -0
- package/packages/components/directive/focus.ts +14 -0
- package/packages/components/directive/idCard.ts +12 -0
- package/packages/components/directive/index.ts +19 -0
- package/packages/components/directive/number.ts +10 -0
- package/packages/components/directive/permission.ts +57 -0
- package/packages/components/directive/phone.ts +12 -0
- package/packages/components/drawer/index.ts +10 -0
- package/packages/components/drawer/src/zh-drawer.vue +78 -0
- package/packages/components/drawer/style/animation.scss +35 -0
- package/packages/components/drawer/style/index.scss +52 -0
- package/packages/components/drawer/style/media.scss +6 -0
- package/packages/components/fileViewer/index.ts +9 -0
- package/packages/components/fileViewer/src/liteofd/annotLayer.ts +203 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/LICENSE +15 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/README.md +108 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/asn1.js +627 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/base64.js +103 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/defs.js +138 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/dumpASN1.js +79 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/hex.js +69 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/int10.js +106 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/oids.js +2725 -0
- package/packages/components/fileViewer/src/liteofd/asn1js/rfcdef.js +10377 -0
- package/packages/components/fileViewer/src/liteofd/attrType.ts +173 -0
- package/packages/components/fileViewer/src/liteofd/contentLayer.ts +203 -0
- package/packages/components/fileViewer/src/liteofd/elements/AnnotationPathSvg.ts +122 -0
- package/packages/components/fileViewer/src/liteofd/elements/BaseSvg.ts +6 -0
- package/packages/components/fileViewer/src/liteofd/elements/ImageSvg.ts +212 -0
- package/packages/components/fileViewer/src/liteofd/elements/PathSvg.ts +460 -0
- package/packages/components/fileViewer/src/liteofd/elements/SignatureElement.ts +231 -0
- package/packages/components/fileViewer/src/liteofd/elements/TextSvg.ts +235 -0
- package/packages/components/fileViewer/src/liteofd/elements/ofdAnnotationElement.ts +133 -0
- package/packages/components/fileViewer/src/liteofd/elements/ofdPageContainer.ts +183 -0
- package/packages/components/fileViewer/src/liteofd/elements/ofdPageRender.ts +71 -0
- package/packages/components/fileViewer/src/liteofd/elements/signObject.json +10084 -0
- package/packages/components/fileViewer/src/liteofd/elements/signature.json +381 -0
- package/packages/components/fileViewer/src/liteofd/font/arithmetic_decoder.js +182 -0
- package/packages/components/fileViewer/src/liteofd/font/ascii_85_stream.js +98 -0
- package/packages/components/fileViewer/src/liteofd/font/ascii_hex_stream.js +79 -0
- package/packages/components/fileViewer/src/liteofd/font/base_stream.js +110 -0
- package/packages/components/fileViewer/src/liteofd/font/bidi.js +440 -0
- package/packages/components/fileViewer/src/liteofd/font/binary_cmap.js +326 -0
- package/packages/components/fileViewer/src/liteofd/font/calibri_factors.js +309 -0
- package/packages/components/fileViewer/src/liteofd/font/ccitt.js +1059 -0
- package/packages/components/fileViewer/src/liteofd/font/ccitt_stream.js +60 -0
- package/packages/components/fileViewer/src/liteofd/font/cff_font.js +139 -0
- package/packages/components/fileViewer/src/liteofd/font/cff_parser.js +1940 -0
- package/packages/components/fileViewer/src/liteofd/font/charsets.js +119 -0
- package/packages/components/fileViewer/src/liteofd/font/chunked_stream.js +94 -0
- package/packages/components/fileViewer/src/liteofd/font/cmap.js +726 -0
- package/packages/components/fileViewer/src/liteofd/font/colorspace.js +1336 -0
- package/packages/components/fileViewer/src/liteofd/font/core_utils.js +636 -0
- package/packages/components/fileViewer/src/liteofd/font/decode_stream.js +177 -0
- package/packages/components/fileViewer/src/liteofd/font/differences.js +906 -0
- package/packages/components/fileViewer/src/liteofd/font/encodings.js +301 -0
- package/packages/components/fileViewer/src/liteofd/font/flate_stream.js +413 -0
- package/packages/components/fileViewer/src/liteofd/font/font_loader.js +455 -0
- package/packages/components/fileViewer/src/liteofd/font/font_renderer.js +900 -0
- package/packages/components/fileViewer/src/liteofd/font/font_substitutions.js +553 -0
- package/packages/components/fileViewer/src/liteofd/font/fonts copy.js +3391 -0
- package/packages/components/fileViewer/src/liteofd/font/fonts.js +3585 -0
- package/packages/components/fileViewer/src/liteofd/font/fonts_utils.js +178 -0
- package/packages/components/fileViewer/src/liteofd/font/function.js +1241 -0
- package/packages/components/fileViewer/src/liteofd/font/glyf.js +701 -0
- package/packages/components/fileViewer/src/liteofd/font/glyphlist.js +4557 -0
- package/packages/components/fileViewer/src/liteofd/font/helvetica_factors.js +352 -0
- package/packages/components/fileViewer/src/liteofd/font/image.js +986 -0
- package/packages/components/fileViewer/src/liteofd/font/image_resizer.js +398 -0
- package/packages/components/fileViewer/src/liteofd/font/image_utils.js +286 -0
- package/packages/components/fileViewer/src/liteofd/font/jbig2_stream.js +74 -0
- package/packages/components/fileViewer/src/liteofd/font/jpeg_stream.js +106 -0
- package/packages/components/fileViewer/src/liteofd/font/jpg.js +1590 -0
- package/packages/components/fileViewer/src/liteofd/font/jpx.js +2349 -0
- package/packages/components/fileViewer/src/liteofd/font/jpx_stream.js +87 -0
- package/packages/components/fileViewer/src/liteofd/font/liberationsans_widths.js +429 -0
- package/packages/components/fileViewer/src/liteofd/font/lzw_stream.js +150 -0
- package/packages/components/fileViewer/src/liteofd/font/metrics.d.ts +1 -0
- package/packages/components/fileViewer/src/liteofd/font/metrics.js +3057 -0
- package/packages/components/fileViewer/src/liteofd/font/murmurhash3.js +135 -0
- package/packages/components/fileViewer/src/liteofd/font/myriadpro_factors.js +291 -0
- package/packages/components/fileViewer/src/liteofd/font/ofd_stream.js +402 -0
- package/packages/components/fileViewer/src/liteofd/font/opentype_file_builder.js +154 -0
- package/packages/components/fileViewer/src/liteofd/font/parser.js +1409 -0
- package/packages/components/fileViewer/src/liteofd/font/pattern.js +1005 -0
- package/packages/components/fileViewer/src/liteofd/font/predictor_stream.js +234 -0
- package/packages/components/fileViewer/src/liteofd/font/primitives.js +354 -0
- package/packages/components/fileViewer/src/liteofd/font/properties.json +2110 -0
- package/packages/components/fileViewer/src/liteofd/font/ps_parser.js +268 -0
- package/packages/components/fileViewer/src/liteofd/font/run_length_stream.js +61 -0
- package/packages/components/fileViewer/src/liteofd/font/segoeui_factors.js +308 -0
- package/packages/components/fileViewer/src/liteofd/font/standard_fonts.js +915 -0
- package/packages/components/fileViewer/src/liteofd/font/stream.js +99 -0
- package/packages/components/fileViewer/src/liteofd/font/to_unicode_map.js +111 -0
- package/packages/components/fileViewer/src/liteofd/font/translatedFont.js +3125 -0
- package/packages/components/fileViewer/src/liteofd/font/type1_font.js +443 -0
- package/packages/components/fileViewer/src/liteofd/font/type1_parser.js +804 -0
- package/packages/components/fileViewer/src/liteofd/font/unicode.js +274 -0
- package/packages/components/fileViewer/src/liteofd/font/util.js +1159 -0
- package/packages/components/fileViewer/src/liteofd/font/xfa_fonts.js +296 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/arithmetic_decoder.js +183 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/ccitt.js +1070 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/core_utils.js +180 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/is_node.js +27 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/jbig2.js +2589 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/jbig2_stream.js +81 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/primitives.js +371 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/stream.js +1348 -0
- package/packages/components/fileViewer/src/liteofd/jbig2/util.js +970 -0
- package/packages/components/fileViewer/src/liteofd/layer.ts +12 -0
- package/packages/components/fileViewer/src/liteofd/liteOfd.ts +185 -0
- package/packages/components/fileViewer/src/liteofd/ofdActions.ts +29 -0
- package/packages/components/fileViewer/src/liteofd/ofdCanvas.ts +19 -0
- package/packages/components/fileViewer/src/liteofd/ofdData.ts +28 -0
- package/packages/components/fileViewer/src/liteofd/ofdDocument.ts +109 -0
- package/packages/components/fileViewer/src/liteofd/ofdFont.ts +425 -0
- package/packages/components/fileViewer/src/liteofd/ofdRender.ts +259 -0
- package/packages/components/fileViewer/src/liteofd/ofdWriter.ts +142 -0
- package/packages/components/fileViewer/src/liteofd/ofdtools.ts +43 -0
- package/packages/components/fileViewer/src/liteofd/parser.ts +499 -0
- package/packages/components/fileViewer/src/liteofd/promiseCapability.ts +47 -0
- package/packages/components/fileViewer/src/liteofd/utils/commonFont.ts +15 -0
- package/packages/components/fileViewer/src/liteofd/utils/elementUtils.ts +362 -0
- package/packages/components/fileViewer/src/liteofd/utils/jsonToXml.ts +95 -0
- package/packages/components/fileViewer/src/liteofd/utils/ofdUtils.ts +301 -0
- package/packages/components/fileViewer/src/liteofd/utils/signatureUtil.ts +246 -0
- package/packages/components/fileViewer/src/liteofd/utils/sm3.ts +235 -0
- package/packages/components/fileViewer/src/liteofd/utils/utils.ts +489 -0
- package/packages/components/fileViewer/src/liteofd/utils/verify_signature_util.ts +41 -0
- package/packages/components/fileViewer/src/ofd/CircleLoading.vue +64 -0
- package/packages/components/fileViewer/src/ofd/OfdPreview.vue +456 -0
- package/packages/components/fileViewer/src/ofd/OfdViewer.vue +211 -0
- package/packages/components/fileViewer/src/ofd/PageIndicator.vue +88 -0
- package/packages/components/fileViewer/src/ofd/RatioIndicator.vue +271 -0
- package/packages/components/fileViewer/src/ofd/ToolTip.vue +81 -0
- package/packages/components/fileViewer/src/zh-fileViewer.vue +426 -0
- package/packages/components/form/index.ts +11 -0
- package/packages/components/form/src/zh-form-item.vue +299 -0
- package/packages/components/form/src/zh-form.vue +90 -0
- package/packages/components/hideNumber/index.ts +9 -0
- package/packages/components/hideNumber/src/zh-hide-number.vue +37 -0
- package/packages/components/icon/index.ts +10 -0
- package/packages/components/icon/src/zh-icon.vue +32 -0
- package/packages/components/image/index.ts +9 -0
- package/packages/components/image/src/zh-image.vue +245 -0
- package/packages/components/index.ts +112 -0
- package/packages/components/input/index.ts +10 -0
- package/packages/components/input/src/input.com.ts +30 -0
- package/packages/components/input/src/input.type.ts +1 -0
- package/packages/components/input/src/zh-input.vue +92 -0
- package/packages/components/input/style/index.scss +30 -0
- package/packages/components/layout/index.ts +12 -0
- package/packages/components/layout/src/zh-col.tsx +81 -0
- package/packages/components/layout/src/zh-row.tsx +58 -0
- package/packages/components/layout/style/row.scss +6 -0
- package/packages/components/map/index.ts +18 -0
- package/packages/components/map/src/zh-amap.vue +999 -0
- package/packages/components/map/src/zh-bmap.vue +1578 -0
- package/packages/components/map/src/zh-omap.vue +1522 -0
- package/packages/components/map/src/zh-smap.vue +1555 -0
- package/packages/components/map/src/zh-tmap.vue +1058 -0
- package/packages/components/message/index.ts +8 -0
- package/packages/components/message/src/data.com.ts +61 -0
- package/packages/components/message/src/message-icon.vue +60 -0
- package/packages/components/message/src/message.ts +89 -0
- package/packages/components/message/src/message.type.ts +40 -0
- package/packages/components/message/src/zh-message.vue +133 -0
- package/packages/components/message-box/index.ts +12 -0
- package/packages/components/message-box/src/messageBox.help.ts +40 -0
- package/packages/components/message-box/src/messageBox.ts +126 -0
- package/packages/components/message-box/src/zh-message-box.vue +94 -0
- package/packages/components/message-box/style/index.css +29 -0
- package/packages/components/noData/index.ts +9 -0
- package/packages/components/noData/src/zh-no-data.vue +42 -0
- package/packages/components/operationColumn/index.ts +9 -0
- package/packages/components/operationColumn/src/zh-operationColumn.vue +113 -0
- package/packages/components/provider/index.ts +11 -0
- package/packages/components/provider/src/zh-authControl.vue +28 -0
- package/packages/components/provider/src/zh-authProvider.vue +36 -0
- package/packages/components/qrcode/index.ts +9 -0
- package/packages/components/qrcode/src/zh-qrcode.vue +271 -0
- package/packages/components/radio/index.ts +10 -0
- package/packages/components/radio/src/zh-radio.vue +86 -0
- package/packages/components/searchForm/index.ts +9 -0
- package/packages/components/searchForm/src/zh-search-form.vue +340 -0
- package/packages/components/signature/index.ts +10 -0
- package/packages/components/signature/src/zh-signature.vue +355 -0
- package/packages/components/switch/index.ts +10 -0
- package/packages/components/switch/src/zh-switch.vue +162 -0
- package/packages/components/table/index.ts +10 -0
- package/packages/components/table/src/types.ts +62 -0
- package/packages/components/table/src/zh-table.vue +220 -0
- package/packages/components/upload/index.ts +15 -0
- package/packages/components/upload/src/zh-cupload.vue +147 -0
- package/packages/components/upload/src/zh-upload.vue +258 -0
- package/packages/components/upload/src/zh-uploadCard.vue +176 -0
- package/packages/components/upload/src/zh-uploadDialog.vue +165 -0
- package/packages/components/videoPlayer/index.ts +12 -0
- package/packages/components/videoPlayer/src/PlayerManager.js +706 -0
- package/packages/components/videoPlayer/src/api.js +354 -0
- package/packages/components/videoPlayer/src/errorHandler.ts +39 -0
- package/packages/components/videoPlayer/src/resourceLoader.ts +68 -0
- package/packages/components/videoPlayer/src/useDahuaPlayer.ts +242 -0
- package/packages/components/videoPlayer/src/zh-dhPlayer.vue +119 -0
- package/packages/components/videoPlayer/src/zh-hlsPlayer.vue +575 -0
- package/packages/resolver/index.ts +324 -0
- package/packages/styles/_element.scss +324 -0
- package/packages/styles/_variable.scss +136 -0
- package/packages/styles/index.scss +3 -0
- package/packages/tokens/tokens.ts +2 -0
- package/packages/types/form.ts +205 -0
- package/packages/types/index.ts +4 -0
- package/packages/types/player.ts +80 -0
- package/packages/types/provider.ts +4 -0
- package/packages/types/searchForm.ts +24 -0
- package/packages/utils/common/__tests__/common.test.ts +12 -0
- package/packages/utils/common/common.ts +68 -0
- package/packages/utils/constant.ts +12 -0
- package/packages/utils/copy.ts +20 -0
- package/packages/utils/data.ts +62 -0
- package/packages/utils/echarts/echarts.ts +34 -0
- package/packages/utils/event.ts +37 -0
- package/packages/utils/hooks/__tests__/hooks.test.ts +24 -0
- package/packages/utils/hooks/data.ts +100 -0
- package/packages/utils/hooks/hooks.util.ts +39 -0
- package/packages/utils/hooks/index.ts +1 -0
- package/packages/utils/hooks/useBreakpoint.ts +89 -0
- package/packages/utils/hooks/useEcharts.ts +56 -0
- package/packages/utils/hooks/useEventListener.ts +57 -0
- package/packages/utils/hooks/useLegendProcessor.ts +92 -0
- package/packages/utils/hooks/usePermission.ts +22 -0
- package/packages/utils/hooks/useTimeout.ts +45 -0
- package/packages/utils/is.ts +79 -0
- package/packages/utils/utils.ts +136 -0
- package/packages/utils/vue/util-modal.vue +61 -0
- package/types/auto-imports.d.ts +9 -0
- package/types/component.d.ts +6 -0
- package/types/components.d.ts +131 -0
- package/types/defaults.d.ts +5 -0
- package/types/el-components.d.ts +23 -0
- package/types/global.d.ts +130 -0
- package/types/index.d.ts +11 -0
- package/types/zh-components.d.ts +23 -0
- package/types/zhui.d.ts +76 -0
- package/.idea/workspace.xml +0 -72
- package/README.md +0 -1
- package/dist/zh-ui.es.js +0 -56706
- package/dist/zh-ui.umd.js +0 -67
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/* Copyright 2023 Mozilla Foundation
|
|
2
|
+
*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { FeatureTest, ImageKind, shadow } from "./util.js";
|
|
17
|
+
|
|
18
|
+
const MIN_IMAGE_DIM = 2048;
|
|
19
|
+
|
|
20
|
+
// In Chrome, there aren't max dimensions but only a max area. So an image with
|
|
21
|
+
// a very large dimensions is acceptable but it probably doesn't hurt to reduce
|
|
22
|
+
// it when considering that it will finally rendered on a small canvas.
|
|
23
|
+
const MAX_IMAGE_DIM = 65537;
|
|
24
|
+
const MAX_ERROR = 128;
|
|
25
|
+
|
|
26
|
+
// Large images are encoded in using the BMP format (it's a way faster than
|
|
27
|
+
// encoding in PNG because there are no checksums to compute).
|
|
28
|
+
// Unfortunately, createImageBitmap will create a task in the main thread in
|
|
29
|
+
// order to build the bitmap, hence the main thread is blocked during the
|
|
30
|
+
// decoding which can be a bit long (see bug 1817244).
|
|
31
|
+
// When bug 1759728 is fixed we can remove the BMP workaround and at least it
|
|
32
|
+
// should be a way faster to create the bitmap.
|
|
33
|
+
|
|
34
|
+
class ImageResizer {
|
|
35
|
+
constructor(imgData, isMask) {
|
|
36
|
+
this._imgData = imgData;
|
|
37
|
+
this._isMask = isMask;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static needsToBeResized(width, height) {
|
|
41
|
+
if (width <= this._goodSquareLength && height <= this._goodSquareLength) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const { MAX_DIM } = this;
|
|
46
|
+
if (width > MAX_DIM || height > MAX_DIM) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const area = width * height;
|
|
51
|
+
if (this._hasMaxArea) {
|
|
52
|
+
return area > this.MAX_AREA;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (area < this._goodSquareLength ** 2) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// We try as much as possible to avoid to compute the max area.
|
|
60
|
+
if (this._areGoodDims(width, height)) {
|
|
61
|
+
this._goodSquareLength = Math.max(
|
|
62
|
+
this._goodSquareLength,
|
|
63
|
+
Math.floor(Math.sqrt(width * height))
|
|
64
|
+
);
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// TODO: the computation can be a bit long because we potentially allocate
|
|
69
|
+
// some large canvas, so in the Firefox case this value (and MAX_DIM) can be
|
|
70
|
+
// infered from prefs (MAX_AREA = gfx.max-alloc-size / 4, 4 is because of
|
|
71
|
+
// RGBA).
|
|
72
|
+
this._goodSquareLength = this._guessMax(
|
|
73
|
+
this._goodSquareLength,
|
|
74
|
+
MAX_DIM,
|
|
75
|
+
MAX_ERROR,
|
|
76
|
+
0
|
|
77
|
+
);
|
|
78
|
+
const maxArea = (this.MAX_AREA = this._goodSquareLength ** 2);
|
|
79
|
+
|
|
80
|
+
return area > maxArea;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static get MAX_DIM() {
|
|
84
|
+
return shadow(
|
|
85
|
+
this,
|
|
86
|
+
"MAX_DIM",
|
|
87
|
+
this._guessMax(MIN_IMAGE_DIM, MAX_IMAGE_DIM, 0, 1)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static get MAX_AREA() {
|
|
92
|
+
this._hasMaxArea = true;
|
|
93
|
+
return shadow(
|
|
94
|
+
this,
|
|
95
|
+
"MAX_AREA",
|
|
96
|
+
this._guessMax(
|
|
97
|
+
ImageResizer._goodSquareLength,
|
|
98
|
+
this.MAX_DIM,
|
|
99
|
+
MAX_ERROR,
|
|
100
|
+
0
|
|
101
|
+
) ** 2
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static set MAX_AREA(area) {
|
|
106
|
+
if (area >= 0) {
|
|
107
|
+
this._hasMaxArea = true;
|
|
108
|
+
shadow(this, "MAX_AREA", area);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static setMaxArea(area) {
|
|
113
|
+
if (!this._hasMaxArea) {
|
|
114
|
+
// Divide by 4 to have the value in pixels.
|
|
115
|
+
this.MAX_AREA = area >> 2;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static _areGoodDims(width, height) {
|
|
120
|
+
try {
|
|
121
|
+
// This code is working in either Firefox or Chrome.
|
|
122
|
+
// There is a faster solution using transferToImageBitmap which is faster
|
|
123
|
+
// in Firefox (when the dimensions are wrong the resulting bitmap has its
|
|
124
|
+
// dimensions equal to 1) but it doesn't find the correct values in
|
|
125
|
+
// Chrome.
|
|
126
|
+
const canvas = new OffscreenCanvas(width, height);
|
|
127
|
+
const ctx = canvas.getContext("2d");
|
|
128
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
129
|
+
const opacity = ctx.getImageData(0, 0, 1, 1).data[3];
|
|
130
|
+
canvas.width = canvas.height = 1;
|
|
131
|
+
return opacity !== 0;
|
|
132
|
+
} catch {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
static _guessMax(start, end, tolerance, defaultHeight) {
|
|
138
|
+
// We don't really need to have exact values.
|
|
139
|
+
// When we're here then we're in a corner case: we've a very large image.
|
|
140
|
+
// So we could potentially downscale an image which fits in the canvas,
|
|
141
|
+
// it's maybe a pity in term of perfs but we'll reduce the memory use.
|
|
142
|
+
// The tolerance is the acceptable error we can make on the limit we want.
|
|
143
|
+
// On Chrome, when the tolerance 0 then it can take ~5s to compute the max
|
|
144
|
+
// area... and having a tolerance of 128 divides the time by 2.
|
|
145
|
+
while (start + tolerance + 1 < end) {
|
|
146
|
+
const middle = Math.floor((start + end) / 2);
|
|
147
|
+
const height = defaultHeight || middle;
|
|
148
|
+
if (this._areGoodDims(middle, height)) {
|
|
149
|
+
start = middle;
|
|
150
|
+
} else {
|
|
151
|
+
end = middle;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return start;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static async createImage(imgData, isMask = false) {
|
|
158
|
+
return new ImageResizer(imgData, isMask)._createImage();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
async _createImage() {
|
|
162
|
+
const data = this._encodeBMP();
|
|
163
|
+
const blob = new Blob([data.buffer], {
|
|
164
|
+
type: "image/bmp",
|
|
165
|
+
});
|
|
166
|
+
const bitmapPromise = createImageBitmap(blob);
|
|
167
|
+
|
|
168
|
+
const { MAX_AREA, MAX_DIM } = ImageResizer;
|
|
169
|
+
const { _imgData: imgData } = this;
|
|
170
|
+
const { width, height } = imgData;
|
|
171
|
+
const minFactor = Math.max(
|
|
172
|
+
width / MAX_DIM,
|
|
173
|
+
height / MAX_DIM,
|
|
174
|
+
Math.sqrt((width * height) / MAX_AREA)
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
const firstFactor = Math.max(minFactor, 2);
|
|
178
|
+
|
|
179
|
+
// Add 1 to the ratio and round it with 1 digit.
|
|
180
|
+
// We add 1.25 in order to have a final image under the limits
|
|
181
|
+
// (and not just at the limits) to reduce memory use.
|
|
182
|
+
const factor = Math.round(10 * (minFactor + 1.25)) / 10 / firstFactor;
|
|
183
|
+
|
|
184
|
+
const N = Math.floor(Math.log2(factor));
|
|
185
|
+
const steps = new Array(N + 2).fill(2);
|
|
186
|
+
steps[0] = firstFactor;
|
|
187
|
+
steps.splice(-1, 1, factor / (1 << N));
|
|
188
|
+
|
|
189
|
+
let newWidth = width;
|
|
190
|
+
let newHeight = height;
|
|
191
|
+
let bitmap = await bitmapPromise;
|
|
192
|
+
|
|
193
|
+
for (const step of steps) {
|
|
194
|
+
const prevWidth = newWidth;
|
|
195
|
+
const prevHeight = newHeight;
|
|
196
|
+
|
|
197
|
+
// See bug 1820511 (Windows specific bug).
|
|
198
|
+
// TODO: once the above bug is fixed we could revert to:
|
|
199
|
+
// newWidth = Math.floor(newWidth / 2);
|
|
200
|
+
newWidth = Math.floor(newWidth / step) - 1;
|
|
201
|
+
newHeight = Math.floor(newHeight / step) - 1;
|
|
202
|
+
|
|
203
|
+
const canvas = new OffscreenCanvas(newWidth, newHeight);
|
|
204
|
+
const ctx = canvas.getContext("2d");
|
|
205
|
+
ctx.drawImage(
|
|
206
|
+
bitmap,
|
|
207
|
+
0,
|
|
208
|
+
0,
|
|
209
|
+
prevWidth,
|
|
210
|
+
prevHeight,
|
|
211
|
+
0,
|
|
212
|
+
0,
|
|
213
|
+
newWidth,
|
|
214
|
+
newHeight
|
|
215
|
+
);
|
|
216
|
+
bitmap = canvas.transferToImageBitmap();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
imgData.data = null;
|
|
220
|
+
imgData.bitmap = bitmap;
|
|
221
|
+
imgData.width = newWidth;
|
|
222
|
+
imgData.height = newHeight;
|
|
223
|
+
|
|
224
|
+
return imgData;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
_encodeBMP() {
|
|
228
|
+
const { width, height, kind } = this._imgData;
|
|
229
|
+
let data = this._imgData.data;
|
|
230
|
+
let bitPerPixel;
|
|
231
|
+
let colorTable = new Uint8Array(0);
|
|
232
|
+
let maskTable = colorTable;
|
|
233
|
+
let compression = 0;
|
|
234
|
+
|
|
235
|
+
// Each row of the image must be padded in order to have a final size which
|
|
236
|
+
// is a multiple of 4.
|
|
237
|
+
|
|
238
|
+
switch (kind) {
|
|
239
|
+
case ImageKind.GRAYSCALE_1BPP: {
|
|
240
|
+
bitPerPixel = 1;
|
|
241
|
+
colorTable = new Uint8Array(
|
|
242
|
+
this._isMask
|
|
243
|
+
? [255, 255, 255, 255, 0, 0, 0, 0]
|
|
244
|
+
: [0, 0, 0, 0, 255, 255, 255, 255]
|
|
245
|
+
);
|
|
246
|
+
const rowLen = (width + 7) >> 3;
|
|
247
|
+
const rowSize = (rowLen + 3) & -4;
|
|
248
|
+
if (rowLen !== rowSize) {
|
|
249
|
+
const newData = new Uint8Array(rowSize * height);
|
|
250
|
+
let k = 0;
|
|
251
|
+
for (
|
|
252
|
+
let i = 0, ii = height * rowLen;
|
|
253
|
+
i < ii;
|
|
254
|
+
i += rowLen, k += rowSize
|
|
255
|
+
) {
|
|
256
|
+
newData.set(data.subarray(i, i + rowLen), k);
|
|
257
|
+
}
|
|
258
|
+
data = newData;
|
|
259
|
+
}
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
case ImageKind.RGB_24BPP: {
|
|
263
|
+
bitPerPixel = 24;
|
|
264
|
+
if (width & 3) {
|
|
265
|
+
const rowLen = 3 * width;
|
|
266
|
+
const rowSize = (rowLen + 3) & -4;
|
|
267
|
+
const extraLen = rowSize - rowLen;
|
|
268
|
+
const newData = new Uint8Array(rowSize * height);
|
|
269
|
+
let k = 0;
|
|
270
|
+
for (let i = 0, ii = height * rowLen; i < ii; i += rowLen) {
|
|
271
|
+
const row = data.subarray(i, i + rowLen);
|
|
272
|
+
for (let j = 0; j < rowLen; j += 3) {
|
|
273
|
+
newData[k++] = row[j + 2];
|
|
274
|
+
newData[k++] = row[j + 1];
|
|
275
|
+
newData[k++] = row[j];
|
|
276
|
+
}
|
|
277
|
+
k += extraLen;
|
|
278
|
+
}
|
|
279
|
+
data = newData;
|
|
280
|
+
} else {
|
|
281
|
+
for (let i = 0, ii = data.length; i < ii; i += 3) {
|
|
282
|
+
// Just swap R and B.
|
|
283
|
+
const tmp = data[i];
|
|
284
|
+
data[i] = data[i + 2];
|
|
285
|
+
data[i + 2] = tmp;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
case ImageKind.RGBA_32BPP:
|
|
291
|
+
bitPerPixel = 32;
|
|
292
|
+
compression = 3;
|
|
293
|
+
maskTable = new Uint8Array(
|
|
294
|
+
4 /* R mask */ +
|
|
295
|
+
4 /* G mask */ +
|
|
296
|
+
4 /* B mask */ +
|
|
297
|
+
4 /* A mask */ +
|
|
298
|
+
52 /* Windows color space stuff */
|
|
299
|
+
);
|
|
300
|
+
const view = new DataView(maskTable.buffer);
|
|
301
|
+
if (FeatureTest.isLittleEndian) {
|
|
302
|
+
view.setUint32(0, 0x000000ff, true);
|
|
303
|
+
view.setUint32(4, 0x0000ff00, true);
|
|
304
|
+
view.setUint32(8, 0x00ff0000, true);
|
|
305
|
+
view.setUint32(12, 0xff000000, true);
|
|
306
|
+
} else {
|
|
307
|
+
view.setUint32(0, 0xff000000, true);
|
|
308
|
+
view.setUint32(4, 0x00ff0000, true);
|
|
309
|
+
view.setUint32(8, 0x0000ff00, true);
|
|
310
|
+
view.setUint32(12, 0x000000ff, true);
|
|
311
|
+
}
|
|
312
|
+
break;
|
|
313
|
+
default:
|
|
314
|
+
throw new Error("invalid format");
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
let i = 0;
|
|
318
|
+
const headerLength = 40 + maskTable.length;
|
|
319
|
+
const fileLength = 14 + headerLength + colorTable.length + data.length;
|
|
320
|
+
const bmpData = new Uint8Array(fileLength);
|
|
321
|
+
const view = new DataView(bmpData.buffer);
|
|
322
|
+
|
|
323
|
+
// Signature.
|
|
324
|
+
view.setUint16(i, 0x4d42, true);
|
|
325
|
+
i += 2;
|
|
326
|
+
|
|
327
|
+
// File size.
|
|
328
|
+
view.setUint32(i, fileLength, true);
|
|
329
|
+
i += 4;
|
|
330
|
+
|
|
331
|
+
// Reserved.
|
|
332
|
+
view.setUint32(i, 0, true);
|
|
333
|
+
i += 4;
|
|
334
|
+
|
|
335
|
+
// Data offset.
|
|
336
|
+
view.setUint32(i, 14 + headerLength + colorTable.length, true);
|
|
337
|
+
i += 4;
|
|
338
|
+
|
|
339
|
+
// Header size.
|
|
340
|
+
view.setUint32(i, headerLength, true);
|
|
341
|
+
i += 4;
|
|
342
|
+
|
|
343
|
+
// Width.
|
|
344
|
+
view.setInt32(i, width, true);
|
|
345
|
+
i += 4;
|
|
346
|
+
|
|
347
|
+
// Height.
|
|
348
|
+
// Negative height indicates that the image is stored from top to bottom.
|
|
349
|
+
view.setInt32(i, -height, true);
|
|
350
|
+
i += 4;
|
|
351
|
+
|
|
352
|
+
// Number of planes (must be 1).
|
|
353
|
+
view.setUint16(i, 1, true);
|
|
354
|
+
i += 2;
|
|
355
|
+
|
|
356
|
+
// Number of bit per pixel.
|
|
357
|
+
view.setUint16(i, bitPerPixel, true);
|
|
358
|
+
i += 2;
|
|
359
|
+
|
|
360
|
+
// Compression method.
|
|
361
|
+
view.setUint32(i, compression, true);
|
|
362
|
+
i += 4;
|
|
363
|
+
|
|
364
|
+
// The image size.
|
|
365
|
+
view.setUint32(i, 0, true);
|
|
366
|
+
i += 4;
|
|
367
|
+
|
|
368
|
+
// Horizontal resolution.
|
|
369
|
+
view.setInt32(i, 0, true);
|
|
370
|
+
i += 4;
|
|
371
|
+
|
|
372
|
+
// Vertical resolution.
|
|
373
|
+
view.setInt32(i, 0, true);
|
|
374
|
+
i += 4;
|
|
375
|
+
|
|
376
|
+
// Number of colors in the palette (0 to default).
|
|
377
|
+
view.setUint32(i, colorTable.length / 4, true);
|
|
378
|
+
i += 4;
|
|
379
|
+
|
|
380
|
+
// Number of important colors used (0 to default).
|
|
381
|
+
view.setUint32(i, 0, true);
|
|
382
|
+
i += 4;
|
|
383
|
+
|
|
384
|
+
bmpData.set(maskTable, i);
|
|
385
|
+
i += maskTable.length;
|
|
386
|
+
|
|
387
|
+
bmpData.set(colorTable, i);
|
|
388
|
+
i += colorTable.length;
|
|
389
|
+
|
|
390
|
+
bmpData.set(data, i);
|
|
391
|
+
|
|
392
|
+
return bmpData;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
ImageResizer._goodSquareLength = MIN_IMAGE_DIM;
|
|
397
|
+
|
|
398
|
+
export { ImageResizer };
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/* Copyright 2019 Mozilla Foundation
|
|
2
|
+
*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
assert,
|
|
18
|
+
MAX_IMAGE_SIZE_TO_CACHE,
|
|
19
|
+
unreachable,
|
|
20
|
+
warn,
|
|
21
|
+
} from "./util.js";
|
|
22
|
+
import { RefSetCache } from "./primitives.js";
|
|
23
|
+
|
|
24
|
+
class BaseLocalCache {
|
|
25
|
+
constructor(options) {
|
|
26
|
+
if (this.constructor === BaseLocalCache) {
|
|
27
|
+
unreachable("Cannot initialize BaseLocalCache.");
|
|
28
|
+
}
|
|
29
|
+
this._onlyRefs = options?.onlyRefs === true;
|
|
30
|
+
|
|
31
|
+
if (!this._onlyRefs) {
|
|
32
|
+
this._nameRefMap = new Map();
|
|
33
|
+
this._imageMap = new Map();
|
|
34
|
+
}
|
|
35
|
+
this._imageCache = new RefSetCache();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
getByName(name) {
|
|
39
|
+
if (this._onlyRefs) {
|
|
40
|
+
unreachable("Should not call `getByName` method.");
|
|
41
|
+
}
|
|
42
|
+
const ref = this._nameRefMap.get(name);
|
|
43
|
+
if (ref) {
|
|
44
|
+
return this.getByRef(ref);
|
|
45
|
+
}
|
|
46
|
+
return this._imageMap.get(name) || null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
getByRef(ref) {
|
|
50
|
+
return this._imageCache.get(ref) || null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
set(name, ref, data) {
|
|
54
|
+
unreachable("Abstract method `set` called.");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
class LocalImageCache extends BaseLocalCache {
|
|
59
|
+
set(name, ref = null, data) {
|
|
60
|
+
if (typeof name !== "string") {
|
|
61
|
+
throw new Error('LocalImageCache.set - expected "name" argument.');
|
|
62
|
+
}
|
|
63
|
+
if (ref) {
|
|
64
|
+
if (this._imageCache.has(ref)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this._nameRefMap.set(name, ref);
|
|
68
|
+
this._imageCache.put(ref, data);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
// name
|
|
72
|
+
if (this._imageMap.has(name)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this._imageMap.set(name, data);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
class LocalColorSpaceCache extends BaseLocalCache {
|
|
80
|
+
set(name = null, ref = null, data) {
|
|
81
|
+
if (typeof name !== "string" && !ref) {
|
|
82
|
+
throw new Error(
|
|
83
|
+
'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.'
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
if (ref) {
|
|
87
|
+
if (this._imageCache.has(ref)) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (name !== null) {
|
|
91
|
+
// Optional when `ref` is defined.
|
|
92
|
+
this._nameRefMap.set(name, ref);
|
|
93
|
+
}
|
|
94
|
+
this._imageCache.put(ref, data);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
// name
|
|
98
|
+
if (this._imageMap.has(name)) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this._imageMap.set(name, data);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
class LocalFunctionCache extends BaseLocalCache {
|
|
106
|
+
constructor(options) {
|
|
107
|
+
super({ onlyRefs: true });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
set(name = null, ref, data) {
|
|
111
|
+
if (!ref) {
|
|
112
|
+
throw new Error('LocalFunctionCache.set - expected "ref" argument.');
|
|
113
|
+
}
|
|
114
|
+
if (this._imageCache.has(ref)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this._imageCache.put(ref, data);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class LocalGStateCache extends BaseLocalCache {
|
|
122
|
+
set(name, ref = null, data) {
|
|
123
|
+
if (typeof name !== "string") {
|
|
124
|
+
throw new Error('LocalGStateCache.set - expected "name" argument.');
|
|
125
|
+
}
|
|
126
|
+
if (ref) {
|
|
127
|
+
if (this._imageCache.has(ref)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
this._nameRefMap.set(name, ref);
|
|
131
|
+
this._imageCache.put(ref, data);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
// name
|
|
135
|
+
if (this._imageMap.has(name)) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
this._imageMap.set(name, data);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
class LocalTilingPatternCache extends BaseLocalCache {
|
|
143
|
+
constructor(options) {
|
|
144
|
+
super({ onlyRefs: true });
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
set(name = null, ref, data) {
|
|
148
|
+
if (!ref) {
|
|
149
|
+
throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');
|
|
150
|
+
}
|
|
151
|
+
if (this._imageCache.has(ref)) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this._imageCache.put(ref, data);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
class RegionalImageCache extends BaseLocalCache {
|
|
159
|
+
constructor(options) {
|
|
160
|
+
super({ onlyRefs: true });
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
set(name = null, ref, data) {
|
|
164
|
+
if (!ref) {
|
|
165
|
+
throw new Error('RegionalImageCache.set - expected "ref" argument.');
|
|
166
|
+
}
|
|
167
|
+
if (this._imageCache.has(ref)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this._imageCache.put(ref, data);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
class GlobalImageCache {
|
|
175
|
+
static NUM_PAGES_THRESHOLD = 2;
|
|
176
|
+
|
|
177
|
+
static MIN_IMAGES_TO_CACHE = 10;
|
|
178
|
+
|
|
179
|
+
static MAX_BYTE_SIZE = 5 * MAX_IMAGE_SIZE_TO_CACHE;
|
|
180
|
+
|
|
181
|
+
constructor() {
|
|
182
|
+
|
|
183
|
+
this._refCache = new RefSetCache();
|
|
184
|
+
this._imageCache = new RefSetCache();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
get _byteSize() {
|
|
188
|
+
let byteSize = 0;
|
|
189
|
+
for (const imageData of this._imageCache) {
|
|
190
|
+
byteSize += imageData.byteSize;
|
|
191
|
+
}
|
|
192
|
+
return byteSize;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
get _cacheLimitReached() {
|
|
196
|
+
if (this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
if (this._byteSize < GlobalImageCache.MAX_BYTE_SIZE) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
shouldCache(ref, pageIndex) {
|
|
206
|
+
let pageIndexSet = this._refCache.get(ref);
|
|
207
|
+
if (!pageIndexSet) {
|
|
208
|
+
pageIndexSet = new Set();
|
|
209
|
+
this._refCache.put(ref, pageIndexSet);
|
|
210
|
+
}
|
|
211
|
+
pageIndexSet.add(pageIndex);
|
|
212
|
+
|
|
213
|
+
if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
if (!this._imageCache.has(ref) && this._cacheLimitReached) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* PLEASE NOTE: Must be called *after* the `setData` method.
|
|
224
|
+
*/
|
|
225
|
+
addByteSize(ref, byteSize) {
|
|
226
|
+
const imageData = this._imageCache.get(ref);
|
|
227
|
+
if (!imageData) {
|
|
228
|
+
return; // The image data isn't cached (the limit was reached).
|
|
229
|
+
}
|
|
230
|
+
if (imageData.byteSize) {
|
|
231
|
+
return; // The byte-size has already been set.
|
|
232
|
+
}
|
|
233
|
+
imageData.byteSize = byteSize;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
getData(ref, pageIndex) {
|
|
237
|
+
const pageIndexSet = this._refCache.get(ref);
|
|
238
|
+
if (!pageIndexSet) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) {
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
const imageData = this._imageCache.get(ref);
|
|
245
|
+
if (!imageData) {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
// Ensure that we keep track of all pages containing the image reference.
|
|
249
|
+
pageIndexSet.add(pageIndex);
|
|
250
|
+
|
|
251
|
+
return imageData;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
setData(ref, data) {
|
|
255
|
+
if (!this._refCache.has(ref)) {
|
|
256
|
+
throw new Error(
|
|
257
|
+
'GlobalImageCache.setData - expected "shouldCache" to have been called.'
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
if (this._imageCache.has(ref)) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (this._cacheLimitReached) {
|
|
264
|
+
warn("GlobalImageCache.setData - cache limit reached.");
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
this._imageCache.put(ref, data);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
clear(onlyData = false) {
|
|
271
|
+
if (!onlyData) {
|
|
272
|
+
this._refCache.clear();
|
|
273
|
+
}
|
|
274
|
+
this._imageCache.clear();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export {
|
|
279
|
+
GlobalImageCache,
|
|
280
|
+
LocalColorSpaceCache,
|
|
281
|
+
LocalFunctionCache,
|
|
282
|
+
LocalGStateCache,
|
|
283
|
+
LocalImageCache,
|
|
284
|
+
LocalTilingPatternCache,
|
|
285
|
+
RegionalImageCache,
|
|
286
|
+
};
|