@vtx/modals2 5.0.2 → 5.0.4
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/lib/_components/index.js +22 -0
- package/lib/_components/vm-bar-charts/index.js +181 -0
- package/lib/_components/vm-calendar/index.js +117 -0
- package/lib/_components/vm-calendar/style/index.js +1 -0
- package/lib/_components/vm-calendar/style/index.less +136 -0
- package/lib/_components/vm-card-statistics/index.js +33 -0
- package/lib/_components/vm-card-statistics/index.less +27 -0
- package/lib/_components/vm-custom/index.js +25 -0
- package/lib/_components/vm-custom/style/index.js +1 -0
- package/lib/_components/vm-custom/style/index.less +20 -0
- package/lib/_components/vm-empty/assets/no_chart.png +0 -0
- package/lib/_components/vm-empty/assets/no_data.png +0 -0
- package/lib/_components/vm-empty/assets/no_data_2.png +0 -0
- package/lib/_components/vm-empty/assets/no_news.png +0 -0
- package/lib/_components/vm-empty/assets/no_permission.png +0 -0
- package/lib/_components/vm-empty/assets/no_picture.png +0 -0
- package/lib/_components/vm-empty/assets/no_result.png +0 -0
- package/lib/_components/vm-empty/assets/no_video.png +0 -0
- package/lib/_components/vm-empty/assets/page_error.png +0 -0
- package/lib/_components/vm-empty/index.js +83 -0
- package/lib/_components/vm-empty/style/index.js +1 -0
- package/lib/_components/vm-empty/style/index.less +22 -0
- package/lib/_components/vm-extra-tab/index.js +44 -0
- package/lib/_components/vm-extra-tab/style/index.js +2 -0
- package/lib/_components/vm-extra-tab/style/index.less +43 -0
- package/lib/_components/vm-factor/index.js +90 -0
- package/lib/_components/vm-factor/style/index.js +2 -0
- package/lib/_components/vm-factor/style/index.less +46 -0
- package/lib/_components/vm-factor-list/index.js +29 -0
- package/lib/_components/vm-factor-list/index.less +11 -0
- package/lib/_components/vm-filter/index.js +148 -0
- package/lib/_components/vm-filter/style/index.js +1 -0
- package/lib/_components/vm-filter/style/index.less +238 -0
- package/lib/_components/vm-iframe-modal/index.js +43 -0
- package/lib/_components/vm-iframe-modal/index.less +9 -0
- package/lib/_components/vm-info-collection/index.js +185 -0
- package/lib/_components/vm-info-collection/style/index.js +1 -0
- package/lib/_components/vm-info-collection/style/index.less +45 -0
- package/lib/_components/vm-line-charts/index.js +151 -0
- package/lib/_components/vm-map/index.js +277 -0
- package/lib/_components/vm-map/index.less +46 -0
- package/lib/_components/vm-pie-charts/index.js +176 -0
- package/lib/_components/vm-pie-charts/index.less +26 -0
- package/lib/_components/vm-progress/index.js +83 -0
- package/lib/_components/vm-progress/style/index.js +1 -0
- package/lib/_components/vm-progress/style/index.less +28 -0
- package/lib/_components/vm-repair-maintain/RmInfoSummary.js +46 -0
- package/lib/_components/vm-repair-maintain/RmMonthTrend.js +44 -0
- package/lib/_components/vm-repair-maintain/RmRecord.js +157 -0
- package/lib/_components/vm-repair-maintain/RmType.js +32 -0
- package/lib/_components/vm-repair-maintain/api.js +92 -0
- package/lib/_components/vm-repair-maintain/imgs/amount.png +0 -0
- package/lib/_components/vm-repair-maintain/imgs/amount_light.png +0 -0
- package/lib/_components/vm-repair-maintain/imgs/count.png +0 -0
- package/lib/_components/vm-repair-maintain/imgs/count_light.png +0 -0
- package/lib/_components/vm-repair-maintain/index.js +56 -0
- package/lib/_components/vm-repair-maintain/style/index.js +1 -0
- package/lib/_components/vm-repair-maintain/style/index.less +25 -0
- package/lib/_components/vm-table/index.js +226 -0
- package/lib/_components/vm-table/style/index.js +1 -0
- package/lib/_components/vm-table/style/index.less +243 -0
- package/lib/_components/vm-tabs/index.js +27 -0
- package/lib/_components/vm-tabs/style/index.js +1 -0
- package/lib/_components/vm-tabs/style/index.less +22 -0
- package/lib/_components/vm-tag/index.js +25 -0
- package/lib/_components/vm-tag/style/index.js +1 -0
- package/lib/_components/vm-tag/style/index.less +71 -0
- package/lib/_components/vm-theme-provider/index.js +18 -0
- package/lib/_components/vm-title/index.js +35 -0
- package/lib/_components/vm-title/style/index.js +1 -0
- package/lib/_components/vm-title/style/index.less +53 -0
- package/lib/_components/vm-tooltip/index.js +15 -0
- package/lib/_components/vm-tooltip/style/index.js +2 -0
- package/lib/_components/vm-tooltip/style/index.less +7 -0
- package/lib/_components/vm-video/RealtimeGrid.js +48 -0
- package/lib/_components/vm-video/index.js +227 -0
- package/lib/_components/vm-video/index.less +168 -0
- package/lib/_components/vm-wrapper/imgs/chart.svg +6 -0
- package/lib/_components/vm-wrapper/imgs/list.svg +8 -0
- package/lib/_components/vm-wrapper/index.js +183 -0
- package/lib/_components/vm-wrapper/resource/ICON_CONFIG.js +127 -0
- package/lib/_components/vm-wrapper/style/index.js +1 -0
- package/lib/_components/vm-wrapper/style/index.less +109 -0
- package/lib/_hooks/useGetChannels.js +19 -0
- package/lib/_hooks/useGetConfig.js +52 -0
- package/lib/_hooks/useSettings.js +31 -0
- package/lib/_imgs/block_alarm.png +0 -0
- package/lib/_imgs/block_normal.png +0 -0
- package/lib/_service/index.js +99 -0
- package/lib/_util/http.js +277 -0
- package/lib/_util/iconSvgHtml.js +1303 -0
- package/lib/_util/index.js +203 -0
- package/lib/index.js +17 -0
- package/lib/resources/jessibuca/decoder.js +3839 -0
- package/lib/resources/jessibuca/decoder.wasm +0 -0
- package/lib/resources/jessibuca/jessibuca.js +5350 -0
- package/lib/style/index.less +258 -0
- package/lib/vtx-area-modal/api.js +165 -0
- package/lib/vtx-area-modal/components/BaseInfo/Lcfx.js +103 -0
- package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +109 -0
- package/lib/vtx-area-modal/components/BaseInfo/index.js +161 -0
- package/lib/vtx-area-modal/components/BaseInfo/index.less +133 -0
- package/lib/vtx-area-modal/components/index.js +2 -0
- package/lib/vtx-area-modal/imgs/onlinePerson.png +0 -0
- package/lib/vtx-area-modal/imgs/onlinePerson_dark.png +0 -0
- package/lib/vtx-area-modal/imgs/schdulePerson.png +0 -0
- package/lib/vtx-area-modal/imgs/schdulePerson_dark.png +0 -0
- package/lib/vtx-area-modal/imgs/todayOnline.png +0 -0
- package/lib/vtx-area-modal/imgs/todayOnline_dark.png +0 -0
- package/lib/vtx-area-modal/imgs/todayWork.png +0 -0
- package/lib/vtx-area-modal/imgs/todayWorkRate.png +0 -0
- package/lib/vtx-area-modal/imgs/todayWorkRate_dark.png +0 -0
- package/lib/vtx-area-modal/imgs/todayWork_dark.png +0 -0
- package/lib/vtx-area-modal/index.js +51 -0
- package/lib/vtx-area-modal/style/index.js +1 -0
- package/lib/vtx-area-modal/style/index.less +1 -0
- package/lib/vtx-base-modal/Header/assets/dark_star.png +0 -0
- package/lib/vtx-base-modal/Header/assets/light_star.png +0 -0
- package/lib/vtx-base-modal/Header/index.js +149 -0
- package/lib/vtx-base-modal/Header/index.less +98 -0
- package/lib/vtx-base-modal/Tabs/index.js +83 -0
- package/lib/vtx-base-modal/Tabs/index.less +31 -0
- package/lib/vtx-base-modal/index.js +205 -0
- package/lib/vtx-base-modal/service.js +39 -0
- package/lib/vtx-base-modal/style/index.js +1 -0
- package/lib/vtx-base-modal/style/index.less +78 -0
- package/lib/vtx-car-modal/api.js +1020 -0
- package/lib/vtx-car-modal/components/Info/index.js +110 -0
- package/lib/vtx-car-modal/components/Info/index.less +6 -0
- package/lib/vtx-car-modal/content/Cc/AlarmInfo/List.js +111 -0
- package/lib/vtx-car-modal/content/Cc/AlarmInfo/StaticInfo.js +77 -0
- package/lib/vtx-car-modal/content/Cc/AlarmInfo/index.js +69 -0
- package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +182 -0
- package/lib/vtx-car-modal/content/Cc/BaseInfo/index.less +24 -0
- package/lib/vtx-car-modal/content/Cc/OrderInfo/Detail.js +187 -0
- package/lib/vtx-car-modal/content/Cc/OrderInfo/index.js +200 -0
- package/lib/vtx-car-modal/content/Cc/OrderInfo/index.less +13 -0
- package/lib/vtx-car-modal/content/Cc/StaticInfo/index.js +395 -0
- package/lib/vtx-car-modal/content/Cc/WorkRecord/Detail.js +237 -0
- package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +140 -0
- package/lib/vtx-car-modal/content/Cc/WorkRecord/index.js +69 -0
- package/lib/vtx-car-modal/content/Cc/index.js +12 -0
- package/lib/vtx-car-modal/content/Common/AlarmInfo/List.js +160 -0
- package/lib/vtx-car-modal/content/Common/AlarmInfo/StaticInfo.js +76 -0
- package/lib/vtx-car-modal/content/Common/AlarmInfo/index.js +71 -0
- package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +195 -0
- package/lib/vtx-car-modal/content/Common/DetailInfo/index.js +173 -0
- package/lib/vtx-car-modal/content/Common/DeviceInfo/index.js +92 -0
- package/lib/vtx-car-modal/content/Common/Maintenance/index.js +137 -0
- package/lib/vtx-car-modal/content/Common/Maintenance/index.less +16 -0
- package/lib/vtx-car-modal/content/Common/OilConsumption/List.js +94 -0
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.js +151 -0
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -0
- package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +232 -0
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +197 -0
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -0
- package/lib/vtx-car-modal/content/Common/index.js +18 -0
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +128 -0
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/StaticInfo.js +79 -0
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/index.js +71 -0
- package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +165 -0
- package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +308 -0
- package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +335 -0
- package/lib/vtx-car-modal/content/JXH/index.js +10 -0
- package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/List.js +105 -0
- package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/StaticInfo.js +78 -0
- package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/index.js +71 -0
- package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +361 -0
- package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.less +24 -0
- package/lib/vtx-car-modal/content/Ljsy/StaticInfo/index.js +405 -0
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +128 -0
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +140 -0
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/index.js +69 -0
- package/lib/vtx-car-modal/content/Ljsy/index.js +10 -0
- package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +208 -0
- package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.less +24 -0
- package/lib/vtx-car-modal/content/Ljzy/StaticInfo/index.js +193 -0
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Detail.js +122 -0
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +110 -0
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/index.js +69 -0
- package/lib/vtx-car-modal/content/Ljzy/index.js +8 -0
- package/lib/vtx-car-modal/content/index.js +6 -0
- package/lib/vtx-car-modal/imgs/calendar/alarm.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/blue_duration.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/blue_mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/car_num.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/cyan_duration.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_alarm.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_car_num.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_duration.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_green_mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_jcl.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/dark_point.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/duration.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/green_mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/jcl.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/calendar/point.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_point.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_trash.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_trash_bg.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_unplanned_point.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_weight.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_weight_bg.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_ws_point.png +0 -0
- package/lib/vtx-car-modal/imgs/dark_ys_point.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/car_num.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_car_num.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_duration.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_jcl.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_oil.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_percent.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_point.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_run.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_speed.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_trash.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_water.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_weight.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dark_ys_point.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/duration.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jcl.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/mileage.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/oil.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/percent.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/point.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/run.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/speed.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/trash.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/water.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/weight.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ys_point.png +0 -0
- package/lib/vtx-car-modal/imgs/point.png +0 -0
- package/lib/vtx-car-modal/imgs/trash.png +0 -0
- package/lib/vtx-car-modal/imgs/trash_bg.png +0 -0
- package/lib/vtx-car-modal/imgs/unplanned_point.png +0 -0
- package/lib/vtx-car-modal/imgs/warn.png +0 -0
- package/lib/vtx-car-modal/imgs/weight.png +0 -0
- package/lib/vtx-car-modal/imgs/weight_bg.png +0 -0
- package/lib/vtx-car-modal/imgs/ws_point.png +0 -0
- package/lib/vtx-car-modal/imgs/ys_point.png +0 -0
- package/lib/vtx-car-modal/index.js +272 -0
- package/lib/vtx-car-modal/style/index.js +3 -0
- package/lib/vtx-car-modal/style/index.less +35 -0
- package/lib/vtx-cc-cp-modal/api.js +381 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +120 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +27 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +32 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +41 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +69 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +103 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +75 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +58 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +142 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +63 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/index.less +16 -0
- package/lib/vtx-cc-cp-modal/components/Calendar/index.js +168 -0
- package/lib/vtx-cc-cp-modal/components/Calendar/index.less +93 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +27 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +32 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +118 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +41 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +69 -0
- package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +111 -0
- package/lib/vtx-cc-cp-modal/components/Restaurant/index.less +3 -0
- package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +46 -0
- package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +81 -0
- package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +78 -0
- package/lib/vtx-cc-cp-modal/components/index.js +7 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjts.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjts_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjzl.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjzl_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsscs.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsscs_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjts.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjts_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjzl.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjzl_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsscs.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsscs_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/index.js +119 -0
- package/lib/vtx-cc-cp-modal/style/index.js +1 -0
- package/lib/vtx-cc-cp-modal/style/index.less +13 -0
- package/lib/vtx-cc-unit-modal/api.js +361 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +69 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +66 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +60 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +91 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +118 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -0
- package/lib/vtx-cc-unit-modal/components/CarList/index.js +129 -0
- package/lib/vtx-cc-unit-modal/components/Collection/index.js +95 -0
- package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +126 -0
- package/lib/vtx-cc-unit-modal/components/Factory/index.js +149 -0
- package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +127 -0
- package/lib/vtx-cc-unit-modal/components/index.js +7 -0
- package/lib/vtx-cc-unit-modal/imgs/jccc.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/jccc_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/jcl.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/jcl_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syts.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syts_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syzl.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syzl_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/index.js +137 -0
- package/lib/vtx-cc-unit-modal/style/index.js +1 -0
- package/lib/vtx-cc-unit-modal/style/index.less +14 -0
- package/lib/vtx-cp-modal/api.js +357 -0
- package/lib/vtx-cp-modal/components/AlarmInfo/AlarmRecord.js +172 -0
- package/lib/vtx-cp-modal/components/AlarmInfo/MonthTrend.js +39 -0
- package/lib/vtx-cp-modal/components/AlarmInfo/Summary.js +84 -0
- package/lib/vtx-cp-modal/components/AlarmInfo/index.js +41 -0
- package/lib/vtx-cp-modal/components/AlarmInfo/index.less +34 -0
- package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +116 -0
- package/lib/vtx-cp-modal/components/BaseInfo/Rules.js +72 -0
- package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +154 -0
- package/lib/vtx-cp-modal/components/BaseInfo/index.js +96 -0
- package/lib/vtx-cp-modal/components/BaseInfo/index.less +140 -0
- package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +200 -0
- package/lib/vtx-cp-modal/components/ExeceptionInfo/MonthTrend.js +35 -0
- package/lib/vtx-cp-modal/components/ExeceptionInfo/Summary.js +84 -0
- package/lib/vtx-cp-modal/components/ExeceptionInfo/index.js +41 -0
- package/lib/vtx-cp-modal/components/SyInfo/Ljcsl.js +62 -0
- package/lib/vtx-cp-modal/components/SyInfo/index.js +306 -0
- package/lib/vtx-cp-modal/components/SyInfo/index.less +18 -0
- package/lib/vtx-cp-modal/components/index.js +5 -0
- package/lib/vtx-cp-modal/imgs/alarm.png +0 -0
- package/lib/vtx-cp-modal/imgs/allRate.png +0 -0
- package/lib/vtx-cp-modal/imgs/allRate_dark.png +0 -0
- package/lib/vtx-cp-modal/imgs/bucket.png +0 -0
- package/lib/vtx-cp-modal/imgs/bucket_dark.png +0 -0
- package/lib/vtx-cp-modal/imgs/collect.png +0 -0
- package/lib/vtx-cp-modal/imgs/collect_dark.png +0 -0
- package/lib/vtx-cp-modal/imgs/corner_cy.png +0 -0
- package/lib/vtx-cp-modal/imgs/corner_khs.png +0 -0
- package/lib/vtx-cp-modal/imgs/corner_qt.png +0 -0
- package/lib/vtx-cp-modal/imgs/corner_yh.png +0 -0
- package/lib/vtx-cp-modal/imgs/cy.png +0 -0
- package/lib/vtx-cp-modal/imgs/default.png +0 -0
- package/lib/vtx-cp-modal/imgs/jhsj.png +0 -0
- package/lib/vtx-cp-modal/imgs/jhsj_light.png +0 -0
- package/lib/vtx-cp-modal/imgs/khs.png +0 -0
- package/lib/vtx-cp-modal/imgs/plan.png +0 -0
- package/lib/vtx-cp-modal/imgs/plan_dark.png +0 -0
- package/lib/vtx-cp-modal/imgs/qt.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjl.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjl_light.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjsj.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjsj_light.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjts.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjts_light.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjzl.png +0 -0
- package/lib/vtx-cp-modal/imgs/sjzl_light.png +0 -0
- package/lib/vtx-cp-modal/imgs/track.png +0 -0
- package/lib/vtx-cp-modal/imgs/weight.png +0 -0
- package/lib/vtx-cp-modal/imgs/weight_dark.png +0 -0
- package/lib/vtx-cp-modal/imgs/yh.png +0 -0
- package/lib/vtx-cp-modal/index.js +124 -0
- package/lib/vtx-cp-modal/style/index.js +3 -0
- package/lib/vtx-cp-modal/style/index.less +1 -0
- package/lib/vtx-default-modal/api.js +170 -0
- package/lib/vtx-default-modal/components/BaseInfo/index.js +109 -0
- package/lib/vtx-default-modal/components/BaseInfo/index.less +26 -0
- package/lib/vtx-default-modal/components/index.js +2 -0
- package/lib/vtx-default-modal/index.js +129 -0
- package/lib/vtx-default-modal/style/index.js +4 -0
- package/lib/vtx-default-modal/style/index.less +1 -0
- package/lib/vtx-device-modal/api.js +531 -0
- package/lib/vtx-device-modal/components/BaseInfo/index.js +140 -0
- package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +279 -0
- package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +611 -0
- package/lib/vtx-device-modal/components/DataAnalysis/TabsList.js +23 -0
- package/lib/vtx-device-modal/components/DataAnalysis/index.js +24 -0
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -0
- package/lib/vtx-device-modal/components/index.js +3 -0
- package/lib/vtx-device-modal/config.js +21 -0
- package/lib/vtx-device-modal/imgs/current.png +0 -0
- package/lib/vtx-device-modal/imgs/current_dark.png +0 -0
- package/lib/vtx-device-modal/imgs/history.png +0 -0
- package/lib/vtx-device-modal/imgs/history_dark.png +0 -0
- package/lib/vtx-device-modal/index.js +96 -0
- package/lib/vtx-device-modal/style/index.js +1 -0
- package/lib/vtx-device-modal/style/index.less +1 -0
- package/lib/vtx-df-modal/api.js +267 -0
- package/lib/vtx-df-modal/components/BaseInfo/Jcqsfx.js +62 -0
- package/lib/vtx-df-modal/components/BaseInfo/Jczbqs.js +96 -0
- package/lib/vtx-df-modal/components/BaseInfo/Qyjcl.js +43 -0
- package/lib/vtx-df-modal/components/BaseInfo/RealtimeMonitor.js +146 -0
- package/lib/vtx-df-modal/components/BaseInfo/Situation.js +47 -0
- package/lib/vtx-df-modal/components/BaseInfo/index.js +140 -0
- package/lib/vtx-df-modal/components/BaseInfo/index.less +161 -0
- package/lib/vtx-df-modal/components/Calendar/index.js +142 -0
- package/lib/vtx-df-modal/components/Calendar/index.less +81 -0
- package/lib/vtx-df-modal/components/Metering/ChartJccc.js +65 -0
- package/lib/vtx-df-modal/components/Metering/ChartJcqs.js +77 -0
- package/lib/vtx-df-modal/components/Metering/List.js +125 -0
- package/lib/vtx-df-modal/components/Metering/index.js +187 -0
- package/lib/vtx-df-modal/components/Metering/index.less +68 -0
- package/lib/vtx-df-modal/components/WorkCondition/Monitor.js +179 -0
- package/lib/vtx-df-modal/components/WorkCondition/Table.js +84 -0
- package/lib/vtx-df-modal/components/WorkCondition/index.js +167 -0
- package/lib/vtx-df-modal/components/WorkCondition/index.less +113 -0
- package/lib/vtx-df-modal/components/index.js +5 -0
- package/lib/vtx-df-modal/imgs/alarm.png +0 -0
- package/lib/vtx-df-modal/imgs/alarm_light.png +0 -0
- package/lib/vtx-df-modal/imgs/c_car.png +0 -0
- package/lib/vtx-df-modal/imgs/c_jcl.png +0 -0
- package/lib/vtx-df-modal/imgs/down.png +0 -0
- package/lib/vtx-df-modal/imgs/jccc.png +0 -0
- package/lib/vtx-df-modal/imgs/jccc_dark.png +0 -0
- package/lib/vtx-df-modal/imgs/jcl.png +0 -0
- package/lib/vtx-df-modal/imgs/jcl_dark.png +0 -0
- package/lib/vtx-df-modal/imgs/normal.png +0 -0
- package/lib/vtx-df-modal/imgs/normal_light.png +0 -0
- package/lib/vtx-df-modal/imgs/rjjcl.svg +55 -0
- package/lib/vtx-df-modal/imgs/rjjcl_dark.svg +94 -0
- package/lib/vtx-df-modal/imgs/situation_parent.png +0 -0
- package/lib/vtx-df-modal/imgs/situation_parent_bg.png +0 -0
- package/lib/vtx-df-modal/imgs/sjnl.svg +39 -0
- package/lib/vtx-df-modal/imgs/sjnl_dark.svg +78 -0
- package/lib/vtx-df-modal/imgs/tab_more.png +0 -0
- package/lib/vtx-df-modal/imgs/tab_more_light.png +0 -0
- package/lib/vtx-df-modal/imgs/up.png +0 -0
- package/lib/vtx-df-modal/imgs/zjccc.svg +44 -0
- package/lib/vtx-df-modal/imgs/zjccc_dark.svg +84 -0
- package/lib/vtx-df-modal/imgs/zjcl.svg +55 -0
- package/lib/vtx-df-modal/imgs/zjcl_dark.svg +94 -0
- package/lib/vtx-df-modal/index.js +137 -0
- package/lib/vtx-df-modal/style/index.js +4 -0
- package/lib/vtx-df-modal/style/index.less +1 -0
- package/lib/vtx-kh-modal/api2.js +178 -0
- package/lib/vtx-kh-modal/components/BaseInfo/index.js +197 -0
- package/lib/vtx-kh-modal/components/BaseInfo/index.less +101 -0
- package/lib/vtx-kh-modal/components/Record/index.js +204 -0
- package/lib/vtx-kh-modal/components/Record/index.less +7 -0
- package/lib/vtx-kh-modal/components/index.js +3 -0
- package/lib/vtx-kh-modal/imgs/count.png +0 -0
- package/lib/vtx-kh-modal/imgs/count_light.png +0 -0
- package/lib/vtx-kh-modal/imgs/question_bg.png +0 -0
- package/lib/vtx-kh-modal/imgs/question_bg_light.png +0 -0
- package/lib/vtx-kh-modal/imgs/score.png +0 -0
- package/lib/vtx-kh-modal/imgs/score_light.png +0 -0
- package/lib/vtx-kh-modal/imgs/subtract.png +0 -0
- package/lib/vtx-kh-modal/imgs/subtract_light.png +0 -0
- package/lib/vtx-kh-modal/index.js +46 -0
- package/lib/vtx-kh-modal/style/index.js +4 -0
- package/lib/vtx-kh-modal/style/index.less +1 -0
- package/lib/vtx-qyry-modal/api.js +129 -0
- package/lib/vtx-qyry-modal/index.js +119 -0
- package/lib/vtx-qyry-modal/style/index.js +1 -0
- package/lib/vtx-restaurant-modal/api.js +297 -0
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +47 -0
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +31 -0
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +36 -0
- package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +41 -0
- package/lib/vtx-restaurant-modal/components/Alarm/index.js +69 -0
- package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +64 -0
- package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +68 -0
- package/lib/vtx-restaurant-modal/components/Basic/Info.js +87 -0
- package/lib/vtx-restaurant-modal/components/Basic/Summary.js +61 -0
- package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +60 -0
- package/lib/vtx-restaurant-modal/components/Basic/index.js +74 -0
- package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -0
- package/lib/vtx-restaurant-modal/components/Calendar/index.js +171 -0
- package/lib/vtx-restaurant-modal/components/Calendar/index.less +93 -0
- package/lib/vtx-restaurant-modal/components/Collection/index.js +86 -0
- package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +111 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +299 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +198 -0
- package/lib/vtx-restaurant-modal/components/index.js +7 -0
- package/lib/vtx-restaurant-modal/config.js +283 -0
- package/lib/vtx-restaurant-modal/imgs/csl.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/csl_dark.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/sycs.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/sycs_dark.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/syts.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/syts_dark.png +0 -0
- package/lib/vtx-restaurant-modal/index.js +168 -0
- package/lib/vtx-restaurant-modal/style/index.js +1 -0
- package/lib/vtx-restaurant-modal/style/index.less +13 -0
- package/lib/vtx-road-modal/api.js +219 -0
- package/lib/vtx-road-modal/components/BaseInfo/Rules.js +48 -0
- package/lib/vtx-road-modal/components/BaseInfo/Work.js +322 -0
- package/lib/vtx-road-modal/components/BaseInfo/index.js +91 -0
- package/lib/vtx-road-modal/components/BaseInfo/index.less +218 -0
- package/lib/vtx-road-modal/components/Calendar/index.js +155 -0
- package/lib/vtx-road-modal/components/Statistical/index.js +244 -0
- package/lib/vtx-road-modal/components/Statistical/index.less +32 -0
- package/lib/vtx-road-modal/components/index.js +4 -0
- package/lib/vtx-road-modal/imgs/calendar/dark_green_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/calendar/dark_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/calendar/green_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/calendar/mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/dark_real.png +0 -0
- package/lib/vtx-road-modal/imgs/dark_valid.png +0 -0
- package/lib/vtx-road-modal/imgs/factor/dark_over_rate.png +0 -0
- package/lib/vtx-road-modal/imgs/factor/dark_plan_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/factor/dark_valid_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/factor/over_rate.png +0 -0
- package/lib/vtx-road-modal/imgs/factor/plan_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/factor/valid_mileage.png +0 -0
- package/lib/vtx-road-modal/imgs/real.png +0 -0
- package/lib/vtx-road-modal/imgs/valid.png +0 -0
- package/lib/vtx-road-modal/index.js +102 -0
- package/lib/vtx-road-modal/style/index.js +3 -0
- package/lib/vtx-road-modal/style/index.less +26 -0
- package/lib/vtx-shxq-modal/api.js +337 -0
- package/lib/vtx-shxq-modal/components/AlarmRecord/List.js +115 -0
- package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +151 -0
- package/lib/vtx-shxq-modal/components/AlarmRecord/index.less +10 -0
- package/lib/vtx-shxq-modal/components/BaseInfo/index.js +190 -0
- package/lib/vtx-shxq-modal/components/BaseInfo/index.less +25 -0
- package/lib/vtx-shxq-modal/components/Tfd/index.js +132 -0
- package/lib/vtx-shxq-modal/components/Tfd/index.less +59 -0
- package/lib/vtx-shxq-modal/components/ThrowCalendar/Chart.js +64 -0
- package/lib/vtx-shxq-modal/components/ThrowCalendar/List.js +72 -0
- package/lib/vtx-shxq-modal/components/ThrowCalendar/index.js +158 -0
- package/lib/vtx-shxq-modal/components/ThrowCalendar/index.less +24 -0
- package/lib/vtx-shxq-modal/components/ThrowRecord/List.js +133 -0
- package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +168 -0
- package/lib/vtx-shxq-modal/components/ThrowRecord/index.less +10 -0
- package/lib/vtx-shxq-modal/components/index.js +6 -0
- package/lib/vtx-shxq-modal/imgs/cy.png +0 -0
- package/lib/vtx-shxq-modal/imgs/khs.png +0 -0
- package/lib/vtx-shxq-modal/imgs/ljht.png +0 -0
- package/lib/vtx-shxq-modal/imgs/ljht_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/qt.png +0 -0
- package/lib/vtx-shxq-modal/imgs/tf_cy_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/tf_khs_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/tf_qt_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/tf_total.png +0 -0
- package/lib/vtx-shxq-modal/imgs/tf_total_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/tf_yh_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/twtf.png +0 -0
- package/lib/vtx-shxq-modal/imgs/twtf_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/wgzs.png +0 -0
- package/lib/vtx-shxq-modal/imgs/wgzs_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/wpd.png +0 -0
- package/lib/vtx-shxq-modal/imgs/wpd_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/wstf.png +0 -0
- package/lib/vtx-shxq-modal/imgs/wstf_dark.png +0 -0
- package/lib/vtx-shxq-modal/imgs/yh.png +0 -0
- package/lib/vtx-shxq-modal/index.js +108 -0
- package/lib/vtx-shxq-modal/style/index.js +1 -0
- package/lib/vtx-staff-modal/api.js +427 -0
- package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +67 -0
- package/lib/vtx-staff-modal/components/AlarmInfo/List.js +111 -0
- package/lib/vtx-staff-modal/components/AlarmInfo/index.js +95 -0
- package/lib/vtx-staff-modal/components/AlarmInfo/index.less +9 -0
- package/lib/vtx-staff-modal/components/Attendance/Exeception.js +58 -0
- package/lib/vtx-staff-modal/components/Attendance/Record.js +154 -0
- package/lib/vtx-staff-modal/components/Attendance/WorkingHours.js +129 -0
- package/lib/vtx-staff-modal/components/Attendance/index.js +49 -0
- package/lib/vtx-staff-modal/components/Attendance/index.less +38 -0
- package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +119 -0
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +42 -0
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStaticDay.js +48 -0
- package/lib/vtx-staff-modal/components/BaseInfo/index.js +183 -0
- package/lib/vtx-staff-modal/components/BaseInfo/index.less +94 -0
- package/lib/vtx-staff-modal/components/Calendar/index.js +237 -0
- package/lib/vtx-staff-modal/components/Calendar/index.less +82 -0
- package/lib/vtx-staff-modal/components/Equipment/index.js +147 -0
- package/lib/vtx-staff-modal/components/Equipment/index.less +29 -0
- package/lib/vtx-staff-modal/components/index.js +6 -0
- package/lib/vtx-staff-modal/imgs/all_time.png +0 -0
- package/lib/vtx-staff-modal/imgs/all_time_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/avg.png +0 -0
- package/lib/vtx-staff-modal/imgs/avg_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/mileage.png +0 -0
- package/lib/vtx-staff-modal/imgs/mileage_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/online.png +0 -0
- package/lib/vtx-staff-modal/imgs/online_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_alarm.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_alarm_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_level.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_level_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_over.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_over_dark.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_sum.png +0 -0
- package/lib/vtx-staff-modal/imgs/time_sum_dark.png +0 -0
- package/lib/vtx-staff-modal/index.js +116 -0
- package/lib/vtx-staff-modal/style/index.js +5 -0
- package/lib/vtx-staff-modal/style/index.less +1 -0
- package/lib/vtx-tfd-modal/api.js +114 -0
- package/lib/vtx-tfd-modal/components/BaseInfo/Jczbqs.js +96 -0
- package/lib/vtx-tfd-modal/components/BaseInfo/Qyjcl.js +43 -0
- package/lib/vtx-tfd-modal/components/BaseInfo/index.js +259 -0
- package/lib/vtx-tfd-modal/components/BaseInfo/index.less +90 -0
- package/lib/vtx-tfd-modal/components/index.js +2 -0
- package/lib/vtx-tfd-modal/imgs/dzc.png +0 -0
- package/lib/vtx-tfd-modal/imgs/dzc_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/dzc_light_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/dzc_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/fdj.png +0 -0
- package/lib/vtx-tfd-modal/imgs/fdj_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/fdj_light_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/fdj_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/hjtfl.png +0 -0
- package/lib/vtx-tfd-modal/imgs/hjtfl_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/jfdhj.png +0 -0
- package/lib/vtx-tfd-modal/imgs/jfdhj_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/jfdhj_light_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/jfdhj_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/khsl.png +0 -0
- package/lib/vtx-tfd-modal/imgs/khsl_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/sxt.png +0 -0
- package/lib/vtx-tfd-modal/imgs/sxt_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/sxt_light_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/sxt_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/xdb.png +0 -0
- package/lib/vtx-tfd-modal/imgs/xdb_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/xdb_light_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/xdb_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/zntfj.png +0 -0
- package/lib/vtx-tfd-modal/imgs/zntfj_light.png +0 -0
- package/lib/vtx-tfd-modal/imgs/zntfj_light_online.png +0 -0
- package/lib/vtx-tfd-modal/imgs/zntfj_online.png +0 -0
- package/lib/vtx-tfd-modal/index.js +106 -0
- package/lib/vtx-tfd-modal/style/index.js +1 -0
- package/lib/vtx-zg-modal/api.js +107 -0
- package/lib/vtx-zg-modal/components/BaseInfo/index.js +287 -0
- package/lib/vtx-zg-modal/components/BaseInfo/index.less +124 -0
- package/lib/vtx-zg-modal/components/index.js +1 -0
- package/lib/vtx-zg-modal/imgs/dot.png +0 -0
- package/lib/vtx-zg-modal/imgs/dot_done.png +0 -0
- package/lib/vtx-zg-modal/index.js +42 -0
- package/lib/vtx-zg-modal/style/index.js +3 -0
- package/lib/vtx-zg-modal/style/index.less +1 -0
- package/lib/vtx-zzz-modal/index.js +135 -0
- package/package.json +4 -4
|
@@ -0,0 +1,3839 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
!function (e, r) {
|
|
9
|
+
"object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) && "undefined" != typeof module ? r(require("path"), require("fs"), require("crypto")) : "function" == typeof define && define.amd ? define(["path", "fs", "crypto"], r) : r((e = "undefined" != typeof globalThis ? globalThis : e || self).path, e.fs, e.crypto$1);
|
|
10
|
+
}(this, function (e, r, t) {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
function n(e) {
|
|
14
|
+
return e && "object" == _typeof(e) && "default" in e ? e : {
|
|
15
|
+
default: e
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var o = n(e),
|
|
19
|
+
i = n(r),
|
|
20
|
+
a = n(t);
|
|
21
|
+
function s(e, r) {
|
|
22
|
+
return e(r = {
|
|
23
|
+
exports: {}
|
|
24
|
+
}, r.exports), r.exports;
|
|
25
|
+
}
|
|
26
|
+
var l = s(function (e) {
|
|
27
|
+
var r = void 0 !== r ? r : {},
|
|
28
|
+
t = (r = {
|
|
29
|
+
print: function print(e) {
|
|
30
|
+
console.log("Jessibuca: [worker]:", e);
|
|
31
|
+
},
|
|
32
|
+
printErr: function printErr(e) {
|
|
33
|
+
console.warn("Jessibuca: [worker]:", e), postMessage({
|
|
34
|
+
cmd: "wasmError",
|
|
35
|
+
message: e
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, Object.assign({}, r)),
|
|
39
|
+
n = "./this.program",
|
|
40
|
+
s = "object" == (typeof window === "undefined" ? "undefined" : _typeof(window)),
|
|
41
|
+
l = "function" == typeof importScripts,
|
|
42
|
+
u = "object" == (typeof process === "undefined" ? "undefined" : _typeof(process)) && "object" == _typeof(process.versions) && "string" == typeof process.versions.node,
|
|
43
|
+
c = !s && !u && !l;
|
|
44
|
+
if (r.ENVIRONMENT) throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");
|
|
45
|
+
var d,
|
|
46
|
+
f,
|
|
47
|
+
p,
|
|
48
|
+
m,
|
|
49
|
+
h,
|
|
50
|
+
g,
|
|
51
|
+
v = "";
|
|
52
|
+
if (u) {
|
|
53
|
+
if ("object" != (typeof process === "undefined" ? "undefined" : _typeof(process))) throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
54
|
+
v = l ? o.default.dirname(v) + "/" : __dirname + "/", g = function g() {
|
|
55
|
+
h || (m = i.default, h = o.default);
|
|
56
|
+
}, d = function d(e, r) {
|
|
57
|
+
return g(), e = h.normalize(e), m.readFileSync(e, r ? void 0 : "utf8");
|
|
58
|
+
}, p = function p(e) {
|
|
59
|
+
var r = d(e, !0);
|
|
60
|
+
return r.buffer || (r = new Uint8Array(r)), F(r.buffer), r;
|
|
61
|
+
}, f = function f(e, r, t) {
|
|
62
|
+
g(), e = h.normalize(e), m.readFile(e, function (e, n) {
|
|
63
|
+
e ? t(e) : r(n.buffer);
|
|
64
|
+
});
|
|
65
|
+
}, process.argv.length > 1 && (n = process.argv[1].replace(/\\/g, "/")), process.argv.slice(2), e.exports = r, process.on("uncaughtException", function (e) {
|
|
66
|
+
if (!(e instanceof St)) throw e;
|
|
67
|
+
}), process.on("unhandledRejection", function (e) {
|
|
68
|
+
throw e;
|
|
69
|
+
}), r.inspect = function () {
|
|
70
|
+
return "[Emscripten Module object]";
|
|
71
|
+
};
|
|
72
|
+
} else if (c) {
|
|
73
|
+
if ("object" == (typeof process === "undefined" ? "undefined" : _typeof(process)) || "object" == (typeof window === "undefined" ? "undefined" : _typeof(window)) || "function" == typeof importScripts) throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
74
|
+
"undefined" != typeof read && (d = function d(e) {
|
|
75
|
+
return read(e);
|
|
76
|
+
}), p = function p(e) {
|
|
77
|
+
var r;
|
|
78
|
+
return "function" == typeof readbuffer ? new Uint8Array(readbuffer(e)) : (r = read(e, "binary"), F("object" == _typeof(r)), r);
|
|
79
|
+
}, f = function f(e, r, t) {
|
|
80
|
+
setTimeout(function () {
|
|
81
|
+
return r(p(e));
|
|
82
|
+
}, 0);
|
|
83
|
+
}, "undefined" != typeof scriptArgs && scriptArgs, "undefined" != typeof print && ("undefined" == typeof console && (console = {}), console.log = print, console.warn = console.error = "undefined" != typeof printErr ? printErr : print);
|
|
84
|
+
} else {
|
|
85
|
+
if (!s && !l) throw new Error("environment detection error");
|
|
86
|
+
if (l ? v = self.location.href : "undefined" != typeof document && document.currentScript && (v = document.currentScript.src), v = 0 !== v.indexOf("blob:") ? v.substr(0, v.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", "object" != (typeof window === "undefined" ? "undefined" : _typeof(window)) && "function" != typeof importScripts) throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
87
|
+
d = function d(e) {
|
|
88
|
+
var r = new XMLHttpRequest();
|
|
89
|
+
return r.open("GET", e, !1), r.send(null), r.responseText;
|
|
90
|
+
}, l && (p = function p(e) {
|
|
91
|
+
var r = new XMLHttpRequest();
|
|
92
|
+
return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);
|
|
93
|
+
}), f = function f(e, r, t) {
|
|
94
|
+
var n = new XMLHttpRequest();
|
|
95
|
+
n.open("GET", e, !0), n.responseType = "arraybuffer", n.onload = function () {
|
|
96
|
+
200 == n.status || 0 == n.status && n.response ? r(n.response) : t();
|
|
97
|
+
}, n.onerror = t, n.send(null);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
var y,
|
|
101
|
+
E,
|
|
102
|
+
w,
|
|
103
|
+
b = r.print || console.log.bind(console),
|
|
104
|
+
_ = r.printErr || console.warn.bind(console);
|
|
105
|
+
function T(e) {
|
|
106
|
+
T.shown || (T.shown = {}), T.shown[e] || (T.shown[e] = 1, _(e));
|
|
107
|
+
}
|
|
108
|
+
function k(e, t) {
|
|
109
|
+
Object.getOwnPropertyDescriptor(r, e) || Object.defineProperty(r, e, {
|
|
110
|
+
configurable: !0,
|
|
111
|
+
get: function get() {
|
|
112
|
+
ge("Module." + e + " has been replaced with plain " + t + " (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)");
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function S(e, r) {
|
|
117
|
+
var t = "'" + e + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";
|
|
118
|
+
return r && (t += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"), t;
|
|
119
|
+
}
|
|
120
|
+
function C(e, t) {
|
|
121
|
+
Object.getOwnPropertyDescriptor(r, e) || Object.defineProperty(r, e, {
|
|
122
|
+
configurable: !0,
|
|
123
|
+
get: function get() {
|
|
124
|
+
ge(S(e, t));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function P(e, t) {
|
|
129
|
+
Object.getOwnPropertyDescriptor(r, e) || (r[e] = function () {
|
|
130
|
+
return ge(S(e, t));
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
Object.assign(r, t), t = null, y = "fetchSettings", Object.getOwnPropertyDescriptor(r, y) && ge("`Module." + y + "` was supplied but `" + y + "` not included in INCOMING_MODULE_JS_API"), r.arguments, k("arguments", "arguments_"), r.thisProgram && (n = r.thisProgram), k("thisProgram", "thisProgram"), r.quit, k("quit", "quit_"), F(void 0 === r.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"), F(void 0 === r.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"), F(void 0 === r.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"), F(void 0 === r.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"), F(void 0 === r.read, "Module.read option was removed (modify read_ in JS)"), F(void 0 === r.readAsync, "Module.readAsync option was removed (modify readAsync in JS)"), F(void 0 === r.readBinary, "Module.readBinary option was removed (modify readBinary in JS)"), F(void 0 === r.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"), F(void 0 === r.TOTAL_MEMORY, "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"), k("read", "read_"), k("readAsync", "readAsync"), k("readBinary", "readBinary"), k("setWindowTitle", "setWindowTitle"), F(!c, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."), r.wasmBinary && (E = r.wasmBinary), k("wasmBinary", "wasmBinary"), r.noExitRuntime, k("noExitRuntime", "noExitRuntime"), "object" != (typeof WebAssembly === "undefined" ? "undefined" : _typeof(WebAssembly)) && ge("no native wasm support detected");
|
|
134
|
+
var A = !1;
|
|
135
|
+
function F(e, r) {
|
|
136
|
+
e || ge("Assertion failed" + (r ? ": " + r : ""));
|
|
137
|
+
}
|
|
138
|
+
var D = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0;
|
|
139
|
+
function O(e, r, t) {
|
|
140
|
+
for (var n = r + t, o = r; e[o] && !(o >= n);) ++o;
|
|
141
|
+
if (o - r > 16 && e.buffer && D) return D.decode(e.subarray(r, o));
|
|
142
|
+
for (var i = ""; r < o;) {
|
|
143
|
+
var a = e[r++];
|
|
144
|
+
if (128 & a) {
|
|
145
|
+
var s = 63 & e[r++];
|
|
146
|
+
if (192 != (224 & a)) {
|
|
147
|
+
var l = 63 & e[r++];
|
|
148
|
+
if (224 == (240 & a) ? a = (15 & a) << 12 | s << 6 | l : (240 != (248 & a) && T("Invalid UTF-8 leading byte 0x" + a.toString(16) + " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), a = (7 & a) << 18 | s << 12 | l << 6 | 63 & e[r++]), a < 65536) i += String.fromCharCode(a);else {
|
|
149
|
+
var u = a - 65536;
|
|
150
|
+
i += String.fromCharCode(55296 | u >> 10, 56320 | 1023 & u);
|
|
151
|
+
}
|
|
152
|
+
} else i += String.fromCharCode((31 & a) << 6 | s);
|
|
153
|
+
} else i += String.fromCharCode(a);
|
|
154
|
+
}
|
|
155
|
+
return i;
|
|
156
|
+
}
|
|
157
|
+
function R(e, r) {
|
|
158
|
+
return e ? O(U, e, r) : "";
|
|
159
|
+
}
|
|
160
|
+
function M(e, r, t, n) {
|
|
161
|
+
if (!(n > 0)) return 0;
|
|
162
|
+
for (var o = t, i = t + n - 1, a = 0; a < e.length; ++a) {
|
|
163
|
+
var s = e.charCodeAt(a);
|
|
164
|
+
if (s >= 55296 && s <= 57343) s = 65536 + ((1023 & s) << 10) | 1023 & e.charCodeAt(++a);
|
|
165
|
+
if (s <= 127) {
|
|
166
|
+
if (t >= i) break;
|
|
167
|
+
r[t++] = s;
|
|
168
|
+
} else if (s <= 2047) {
|
|
169
|
+
if (t + 1 >= i) break;
|
|
170
|
+
r[t++] = 192 | s >> 6, r[t++] = 128 | 63 & s;
|
|
171
|
+
} else if (s <= 65535) {
|
|
172
|
+
if (t + 2 >= i) break;
|
|
173
|
+
r[t++] = 224 | s >> 12, r[t++] = 128 | s >> 6 & 63, r[t++] = 128 | 63 & s;
|
|
174
|
+
} else {
|
|
175
|
+
if (t + 3 >= i) break;
|
|
176
|
+
s > 1114111 && T("Invalid Unicode code point 0x" + s.toString(16) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."), r[t++] = 240 | s >> 18, r[t++] = 128 | s >> 12 & 63, r[t++] = 128 | s >> 6 & 63, r[t++] = 128 | 63 & s;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return r[t] = 0, t - o;
|
|
180
|
+
}
|
|
181
|
+
function N(e, r, t) {
|
|
182
|
+
return F("number" == typeof t, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), M(e, U, r, t);
|
|
183
|
+
}
|
|
184
|
+
function I(e) {
|
|
185
|
+
for (var r = 0, t = 0; t < e.length; ++t) {
|
|
186
|
+
var n = e.charCodeAt(t);
|
|
187
|
+
n >= 55296 && n <= 57343 && (n = 65536 + ((1023 & n) << 10) | 1023 & e.charCodeAt(++t)), n <= 127 ? ++r : r += n <= 2047 ? 2 : n <= 65535 ? 3 : 4;
|
|
188
|
+
}
|
|
189
|
+
return r;
|
|
190
|
+
}
|
|
191
|
+
var L,
|
|
192
|
+
x,
|
|
193
|
+
U,
|
|
194
|
+
B,
|
|
195
|
+
j,
|
|
196
|
+
$,
|
|
197
|
+
W,
|
|
198
|
+
z,
|
|
199
|
+
H,
|
|
200
|
+
G = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0;
|
|
201
|
+
function V(e, r) {
|
|
202
|
+
F(e % 2 == 0, "Pointer passed to UTF16ToString must be aligned to two bytes!");
|
|
203
|
+
for (var t = e, n = t >> 1, o = n + r / 2; !(n >= o) && j[n];) ++n;
|
|
204
|
+
if ((t = n << 1) - e > 32 && G) return G.decode(U.subarray(e, t));
|
|
205
|
+
for (var i = "", a = 0; !(a >= r / 2); ++a) {
|
|
206
|
+
var s = B[e + 2 * a >> 1];
|
|
207
|
+
if (0 == s) break;
|
|
208
|
+
i += String.fromCharCode(s);
|
|
209
|
+
}
|
|
210
|
+
return i;
|
|
211
|
+
}
|
|
212
|
+
function Y(e, r, t) {
|
|
213
|
+
if (F(r % 2 == 0, "Pointer passed to stringToUTF16 must be aligned to two bytes!"), F("number" == typeof t, "stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), void 0 === t && (t = 2147483647), t < 2) return 0;
|
|
214
|
+
for (var n = r, o = (t -= 2) < 2 * e.length ? t / 2 : e.length, i = 0; i < o; ++i) {
|
|
215
|
+
var a = e.charCodeAt(i);
|
|
216
|
+
B[r >> 1] = a, r += 2;
|
|
217
|
+
}
|
|
218
|
+
return B[r >> 1] = 0, r - n;
|
|
219
|
+
}
|
|
220
|
+
function q(e) {
|
|
221
|
+
return 2 * e.length;
|
|
222
|
+
}
|
|
223
|
+
function X(e, r) {
|
|
224
|
+
F(e % 4 == 0, "Pointer passed to UTF32ToString must be aligned to four bytes!");
|
|
225
|
+
for (var t = 0, n = ""; !(t >= r / 4);) {
|
|
226
|
+
var o = $[e + 4 * t >> 2];
|
|
227
|
+
if (0 == o) break;
|
|
228
|
+
if (++t, o >= 65536) {
|
|
229
|
+
var i = o - 65536;
|
|
230
|
+
n += String.fromCharCode(55296 | i >> 10, 56320 | 1023 & i);
|
|
231
|
+
} else n += String.fromCharCode(o);
|
|
232
|
+
}
|
|
233
|
+
return n;
|
|
234
|
+
}
|
|
235
|
+
function K(e, r, t) {
|
|
236
|
+
if (F(r % 4 == 0, "Pointer passed to stringToUTF32 must be aligned to four bytes!"), F("number" == typeof t, "stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), void 0 === t && (t = 2147483647), t < 4) return 0;
|
|
237
|
+
for (var n = r, o = n + t - 4, i = 0; i < e.length; ++i) {
|
|
238
|
+
var a = e.charCodeAt(i);
|
|
239
|
+
if (a >= 55296 && a <= 57343) a = 65536 + ((1023 & a) << 10) | 1023 & e.charCodeAt(++i);
|
|
240
|
+
if ($[r >> 2] = a, (r += 4) + 4 > o) break;
|
|
241
|
+
}
|
|
242
|
+
return $[r >> 2] = 0, r - n;
|
|
243
|
+
}
|
|
244
|
+
function J(e) {
|
|
245
|
+
for (var r = 0, t = 0; t < e.length; ++t) {
|
|
246
|
+
var n = e.charCodeAt(t);
|
|
247
|
+
n >= 55296 && n <= 57343 && ++t, r += 4;
|
|
248
|
+
}
|
|
249
|
+
return r;
|
|
250
|
+
}
|
|
251
|
+
function Q(e) {
|
|
252
|
+
var r = I(e) + 1,
|
|
253
|
+
t = gt(r);
|
|
254
|
+
return t && M(e, x, t, r), t;
|
|
255
|
+
}
|
|
256
|
+
function Z(e) {
|
|
257
|
+
L = e, r.HEAP8 = x = new Int8Array(e), r.HEAP16 = B = new Int16Array(e), r.HEAP32 = $ = new Int32Array(e), r.HEAPU8 = U = new Uint8Array(e), r.HEAPU16 = j = new Uint16Array(e), r.HEAPU32 = W = new Uint32Array(e), r.HEAPF32 = z = new Float32Array(e), r.HEAPF64 = H = new Float64Array(e);
|
|
258
|
+
}
|
|
259
|
+
var ee = 5242880;
|
|
260
|
+
r.TOTAL_STACK && F(ee === r.TOTAL_STACK, "the stack size can no longer be determined at runtime");
|
|
261
|
+
var re,
|
|
262
|
+
te = r.INITIAL_MEMORY || 67108864;
|
|
263
|
+
function ne() {
|
|
264
|
+
var e = kt();
|
|
265
|
+
F(0 == (3 & e)), $[e >> 2] = 34821223, $[e + 4 >> 2] = 2310721022, $[0] = 1668509029;
|
|
266
|
+
}
|
|
267
|
+
function oe() {
|
|
268
|
+
if (!A) {
|
|
269
|
+
var e = kt(),
|
|
270
|
+
r = W[e >> 2],
|
|
271
|
+
t = W[e + 4 >> 2];
|
|
272
|
+
34821223 == r && 2310721022 == t || ge("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x" + t.toString(16) + " 0x" + r.toString(16)), 1668509029 !== $[0] && ge("Runtime error: The application has corrupted its heap memory area (address zero)!");
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
k("INITIAL_MEMORY", "INITIAL_MEMORY"), F(te >= ee, "INITIAL_MEMORY should be larger than TOTAL_STACK, was " + te + "! (TOTAL_STACK=" + "5242880)"), F("undefined" != typeof Int32Array && "undefined" != typeof Float64Array && null != Int32Array.prototype.subarray && null != Int32Array.prototype.set, "JS engine does not provide full typed array support"), F(!r.wasmMemory, "Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"), F(67108864 == te, "Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"), function () {
|
|
276
|
+
var e = new Int16Array(1),
|
|
277
|
+
r = new Int8Array(e.buffer);
|
|
278
|
+
if (e[0] = 25459, 115 !== r[0] || 99 !== r[1]) throw "Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";
|
|
279
|
+
}();
|
|
280
|
+
var ie = [],
|
|
281
|
+
ae = [],
|
|
282
|
+
se = [],
|
|
283
|
+
le = !1;
|
|
284
|
+
F(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), F(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), F(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), F(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
285
|
+
var ue = 0,
|
|
286
|
+
ce = null,
|
|
287
|
+
de = null,
|
|
288
|
+
fe = {};
|
|
289
|
+
function pe(e) {
|
|
290
|
+
for (var r = e;;) {
|
|
291
|
+
if (!fe[e]) return e;
|
|
292
|
+
e = r + Math.random();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
function me(e) {
|
|
296
|
+
ue++, r.monitorRunDependencies && r.monitorRunDependencies(ue), e ? (F(!fe[e]), fe[e] = 1, null === ce && "undefined" != typeof setInterval && (ce = setInterval(function () {
|
|
297
|
+
if (A) return clearInterval(ce), void (ce = null);
|
|
298
|
+
var e = !1;
|
|
299
|
+
for (var r in fe) e || (e = !0, _("still waiting on run dependencies:")), _("dependency: " + r);
|
|
300
|
+
e && _("(end of list)");
|
|
301
|
+
}, 1e4))) : _("warning: run dependency added without ID");
|
|
302
|
+
}
|
|
303
|
+
function he(e) {
|
|
304
|
+
if (ue--, r.monitorRunDependencies && r.monitorRunDependencies(ue), e ? (F(fe[e]), delete fe[e]) : _("warning: run dependency removed without ID"), 0 == ue && (null !== ce && (clearInterval(ce), ce = null), de)) {
|
|
305
|
+
var t = de;
|
|
306
|
+
de = null, t();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
function ge(e) {
|
|
310
|
+
throw r.onAbort && r.onAbort(e), _(e = "Aborted(" + e + ")"), A = !0, new WebAssembly.RuntimeError(e);
|
|
311
|
+
}
|
|
312
|
+
var ve, ye, Ee;
|
|
313
|
+
function we(e) {
|
|
314
|
+
return e.startsWith("data:application/octet-stream;base64,");
|
|
315
|
+
}
|
|
316
|
+
function be(e) {
|
|
317
|
+
return e.startsWith("file://");
|
|
318
|
+
}
|
|
319
|
+
function _e(e, t) {
|
|
320
|
+
return function () {
|
|
321
|
+
var n = e,
|
|
322
|
+
o = t;
|
|
323
|
+
return t || (o = r.asm), F(le, "native function `" + n + "` called before runtime initialization"), o[e] || F(o[e], "exported native function `" + n + "` not found"), o[e].apply(null, arguments);
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function Te(e) {
|
|
327
|
+
try {
|
|
328
|
+
if (e == ve && E) return new Uint8Array(E);
|
|
329
|
+
if (p) return p(e);
|
|
330
|
+
throw "both async and sync fetching of the wasm failed";
|
|
331
|
+
} catch (e) {
|
|
332
|
+
ge(e);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function ke(e) {
|
|
336
|
+
for (; e.length > 0;) {
|
|
337
|
+
var t = e.shift();
|
|
338
|
+
if ("function" != typeof t) {
|
|
339
|
+
var n = t.func;
|
|
340
|
+
"number" == typeof n ? void 0 === t.arg ? Ce(n)() : Ce(n)(t.arg) : n(void 0 === t.arg ? null : t.arg);
|
|
341
|
+
} else t(r);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function Se(e) {
|
|
345
|
+
return e.replace(/\b_Z[\w\d_]+/g, function (e) {
|
|
346
|
+
var r,
|
|
347
|
+
t = (r = e, T("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"), r);
|
|
348
|
+
return e === t ? e : t + " [" + e + "]";
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function Ce(e) {
|
|
352
|
+
return re.get(e);
|
|
353
|
+
}
|
|
354
|
+
function Pe() {
|
|
355
|
+
var e = new Error();
|
|
356
|
+
if (!e.stack) {
|
|
357
|
+
try {
|
|
358
|
+
throw new Error();
|
|
359
|
+
} catch (r) {
|
|
360
|
+
e = r;
|
|
361
|
+
}
|
|
362
|
+
if (!e.stack) return "(no stack trace available)";
|
|
363
|
+
}
|
|
364
|
+
return e.stack.toString();
|
|
365
|
+
}
|
|
366
|
+
we(ve = "decoder.wasm") || (ve = function (e) {
|
|
367
|
+
return r.locateFile ? r.locateFile(e, v) : v + e;
|
|
368
|
+
}(ve));
|
|
369
|
+
var Ae = {
|
|
370
|
+
isAbs: function isAbs(e) {
|
|
371
|
+
return "/" === e.charAt(0);
|
|
372
|
+
},
|
|
373
|
+
splitPath: function splitPath(e) {
|
|
374
|
+
return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);
|
|
375
|
+
},
|
|
376
|
+
normalizeArray: function normalizeArray(e, r) {
|
|
377
|
+
for (var t = 0, n = e.length - 1; n >= 0; n--) {
|
|
378
|
+
var o = e[n];
|
|
379
|
+
"." === o ? e.splice(n, 1) : ".." === o ? (e.splice(n, 1), t++) : t && (e.splice(n, 1), t--);
|
|
380
|
+
}
|
|
381
|
+
if (r) for (; t; t--) e.unshift("..");
|
|
382
|
+
return e;
|
|
383
|
+
},
|
|
384
|
+
normalize: function normalize(e) {
|
|
385
|
+
var r = Ae.isAbs(e),
|
|
386
|
+
t = "/" === e.substr(-1);
|
|
387
|
+
return (e = Ae.normalizeArray(e.split("/").filter(function (e) {
|
|
388
|
+
return !!e;
|
|
389
|
+
}), !r).join("/")) || r || (e = "."), e && t && (e += "/"), (r ? "/" : "") + e;
|
|
390
|
+
},
|
|
391
|
+
dirname: function dirname(e) {
|
|
392
|
+
var r = Ae.splitPath(e),
|
|
393
|
+
t = r[0],
|
|
394
|
+
n = r[1];
|
|
395
|
+
return t || n ? (n && (n = n.substr(0, n.length - 1)), t + n) : ".";
|
|
396
|
+
},
|
|
397
|
+
basename: function basename(e) {
|
|
398
|
+
if ("/" === e) return "/";
|
|
399
|
+
var r = (e = (e = Ae.normalize(e)).replace(/\/$/, "")).lastIndexOf("/");
|
|
400
|
+
return -1 === r ? e : e.substr(r + 1);
|
|
401
|
+
},
|
|
402
|
+
join: function join() {
|
|
403
|
+
var e = Array.prototype.slice.call(arguments, 0);
|
|
404
|
+
return Ae.normalize(e.join("/"));
|
|
405
|
+
},
|
|
406
|
+
join2: function join2(e, r) {
|
|
407
|
+
return Ae.normalize(e + "/" + r);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
var Fe = {
|
|
411
|
+
resolve: function resolve() {
|
|
412
|
+
for (var e = "", r = !1, t = arguments.length - 1; t >= -1 && !r; t--) {
|
|
413
|
+
var n = t >= 0 ? arguments[t] : Ie.cwd();
|
|
414
|
+
if ("string" != typeof n) throw new TypeError("Arguments to path.resolve must be strings");
|
|
415
|
+
if (!n) return "";
|
|
416
|
+
e = n + "/" + e, r = Ae.isAbs(n);
|
|
417
|
+
}
|
|
418
|
+
return (r ? "/" : "") + (e = Ae.normalizeArray(e.split("/").filter(function (e) {
|
|
419
|
+
return !!e;
|
|
420
|
+
}), !r).join("/")) || ".";
|
|
421
|
+
},
|
|
422
|
+
relative: function relative(e, r) {
|
|
423
|
+
function t(e) {
|
|
424
|
+
for (var r = 0; r < e.length && "" === e[r]; r++);
|
|
425
|
+
for (var t = e.length - 1; t >= 0 && "" === e[t]; t--);
|
|
426
|
+
return r > t ? [] : e.slice(r, t - r + 1);
|
|
427
|
+
}
|
|
428
|
+
e = Fe.resolve(e).substr(1), r = Fe.resolve(r).substr(1);
|
|
429
|
+
for (var n = t(e.split("/")), o = t(r.split("/")), i = Math.min(n.length, o.length), a = i, s = 0; s < i; s++) if (n[s] !== o[s]) {
|
|
430
|
+
a = s;
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
var l = [];
|
|
434
|
+
for (s = a; s < n.length; s++) l.push("..");
|
|
435
|
+
return (l = l.concat(o.slice(a))).join("/");
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
De = {
|
|
439
|
+
ttys: [],
|
|
440
|
+
init: function init() {},
|
|
441
|
+
shutdown: function shutdown() {},
|
|
442
|
+
register: function register(e, r) {
|
|
443
|
+
De.ttys[e] = {
|
|
444
|
+
input: [],
|
|
445
|
+
output: [],
|
|
446
|
+
ops: r
|
|
447
|
+
}, Ie.registerDevice(e, De.stream_ops);
|
|
448
|
+
},
|
|
449
|
+
stream_ops: {
|
|
450
|
+
open: function open(e) {
|
|
451
|
+
var r = De.ttys[e.node.rdev];
|
|
452
|
+
if (!r) throw new Ie.ErrnoError(43);
|
|
453
|
+
e.tty = r, e.seekable = !1;
|
|
454
|
+
},
|
|
455
|
+
close: function close(e) {
|
|
456
|
+
e.tty.ops.flush(e.tty);
|
|
457
|
+
},
|
|
458
|
+
flush: function flush(e) {
|
|
459
|
+
e.tty.ops.flush(e.tty);
|
|
460
|
+
},
|
|
461
|
+
read: function read(e, r, t, n, o) {
|
|
462
|
+
if (!e.tty || !e.tty.ops.get_char) throw new Ie.ErrnoError(60);
|
|
463
|
+
for (var i = 0, a = 0; a < n; a++) {
|
|
464
|
+
var s;
|
|
465
|
+
try {
|
|
466
|
+
s = e.tty.ops.get_char(e.tty);
|
|
467
|
+
} catch (e) {
|
|
468
|
+
throw new Ie.ErrnoError(29);
|
|
469
|
+
}
|
|
470
|
+
if (void 0 === s && 0 === i) throw new Ie.ErrnoError(6);
|
|
471
|
+
if (null == s) break;
|
|
472
|
+
i++, r[t + a] = s;
|
|
473
|
+
}
|
|
474
|
+
return i && (e.node.timestamp = Date.now()), i;
|
|
475
|
+
},
|
|
476
|
+
write: function write(e, r, t, n, o) {
|
|
477
|
+
if (!e.tty || !e.tty.ops.put_char) throw new Ie.ErrnoError(60);
|
|
478
|
+
try {
|
|
479
|
+
for (var i = 0; i < n; i++) e.tty.ops.put_char(e.tty, r[t + i]);
|
|
480
|
+
} catch (e) {
|
|
481
|
+
throw new Ie.ErrnoError(29);
|
|
482
|
+
}
|
|
483
|
+
return n && (e.node.timestamp = Date.now()), i;
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
default_tty_ops: {
|
|
487
|
+
get_char: function get_char(e) {
|
|
488
|
+
if (!e.input.length) {
|
|
489
|
+
var r = null;
|
|
490
|
+
if (u) {
|
|
491
|
+
var t = Buffer.alloc(256),
|
|
492
|
+
n = 0;
|
|
493
|
+
try {
|
|
494
|
+
n = m.readSync(process.stdin.fd, t, 0, 256, -1);
|
|
495
|
+
} catch (e) {
|
|
496
|
+
if (!e.toString().includes("EOF")) throw e;
|
|
497
|
+
n = 0;
|
|
498
|
+
}
|
|
499
|
+
r = n > 0 ? t.slice(0, n).toString("utf-8") : null;
|
|
500
|
+
} else "undefined" != typeof window && "function" == typeof window.prompt ? null !== (r = window.prompt("Input: ")) && (r += "\n") : "function" == typeof readline && null !== (r = readline()) && (r += "\n");
|
|
501
|
+
if (!r) return null;
|
|
502
|
+
e.input = pt(r, !0);
|
|
503
|
+
}
|
|
504
|
+
return e.input.shift();
|
|
505
|
+
},
|
|
506
|
+
put_char: function put_char(e, r) {
|
|
507
|
+
null === r || 10 === r ? (b(O(e.output, 0)), e.output = []) : 0 != r && e.output.push(r);
|
|
508
|
+
},
|
|
509
|
+
flush: function flush(e) {
|
|
510
|
+
e.output && e.output.length > 0 && (b(O(e.output, 0)), e.output = []);
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
default_tty1_ops: {
|
|
514
|
+
put_char: function put_char(e, r) {
|
|
515
|
+
null === r || 10 === r ? (_(O(e.output, 0)), e.output = []) : 0 != r && e.output.push(r);
|
|
516
|
+
},
|
|
517
|
+
flush: function flush(e) {
|
|
518
|
+
e.output && e.output.length > 0 && (_(O(e.output, 0)), e.output = []);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
function Oe(e) {
|
|
523
|
+
e = function (e, r) {
|
|
524
|
+
return F(r, "alignment argument is required"), Math.ceil(e / r) * r;
|
|
525
|
+
}(e, 65536);
|
|
526
|
+
var r = bt(65536, e);
|
|
527
|
+
return r ? (function (e, r) {
|
|
528
|
+
U.fill(0, e, e + r);
|
|
529
|
+
}(r, e), r) : 0;
|
|
530
|
+
}
|
|
531
|
+
var Re = {
|
|
532
|
+
ops_table: null,
|
|
533
|
+
mount: function mount(e) {
|
|
534
|
+
return Re.createNode(null, "/", 16895, 0);
|
|
535
|
+
},
|
|
536
|
+
createNode: function createNode(e, r, t, n) {
|
|
537
|
+
if (Ie.isBlkdev(t) || Ie.isFIFO(t)) throw new Ie.ErrnoError(63);
|
|
538
|
+
Re.ops_table || (Re.ops_table = {
|
|
539
|
+
dir: {
|
|
540
|
+
node: {
|
|
541
|
+
getattr: Re.node_ops.getattr,
|
|
542
|
+
setattr: Re.node_ops.setattr,
|
|
543
|
+
lookup: Re.node_ops.lookup,
|
|
544
|
+
mknod: Re.node_ops.mknod,
|
|
545
|
+
rename: Re.node_ops.rename,
|
|
546
|
+
unlink: Re.node_ops.unlink,
|
|
547
|
+
rmdir: Re.node_ops.rmdir,
|
|
548
|
+
readdir: Re.node_ops.readdir,
|
|
549
|
+
symlink: Re.node_ops.symlink
|
|
550
|
+
},
|
|
551
|
+
stream: {
|
|
552
|
+
llseek: Re.stream_ops.llseek
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
file: {
|
|
556
|
+
node: {
|
|
557
|
+
getattr: Re.node_ops.getattr,
|
|
558
|
+
setattr: Re.node_ops.setattr
|
|
559
|
+
},
|
|
560
|
+
stream: {
|
|
561
|
+
llseek: Re.stream_ops.llseek,
|
|
562
|
+
read: Re.stream_ops.read,
|
|
563
|
+
write: Re.stream_ops.write,
|
|
564
|
+
allocate: Re.stream_ops.allocate,
|
|
565
|
+
mmap: Re.stream_ops.mmap,
|
|
566
|
+
msync: Re.stream_ops.msync
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
link: {
|
|
570
|
+
node: {
|
|
571
|
+
getattr: Re.node_ops.getattr,
|
|
572
|
+
setattr: Re.node_ops.setattr,
|
|
573
|
+
readlink: Re.node_ops.readlink
|
|
574
|
+
},
|
|
575
|
+
stream: {}
|
|
576
|
+
},
|
|
577
|
+
chrdev: {
|
|
578
|
+
node: {
|
|
579
|
+
getattr: Re.node_ops.getattr,
|
|
580
|
+
setattr: Re.node_ops.setattr
|
|
581
|
+
},
|
|
582
|
+
stream: Ie.chrdev_stream_ops
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
var o = Ie.createNode(e, r, t, n);
|
|
586
|
+
return Ie.isDir(o.mode) ? (o.node_ops = Re.ops_table.dir.node, o.stream_ops = Re.ops_table.dir.stream, o.contents = {}) : Ie.isFile(o.mode) ? (o.node_ops = Re.ops_table.file.node, o.stream_ops = Re.ops_table.file.stream, o.usedBytes = 0, o.contents = null) : Ie.isLink(o.mode) ? (o.node_ops = Re.ops_table.link.node, o.stream_ops = Re.ops_table.link.stream) : Ie.isChrdev(o.mode) && (o.node_ops = Re.ops_table.chrdev.node, o.stream_ops = Re.ops_table.chrdev.stream), o.timestamp = Date.now(), e && (e.contents[r] = o, e.timestamp = o.timestamp), o;
|
|
587
|
+
},
|
|
588
|
+
getFileDataAsTypedArray: function getFileDataAsTypedArray(e) {
|
|
589
|
+
return e.contents ? e.contents.subarray ? e.contents.subarray(0, e.usedBytes) : new Uint8Array(e.contents) : new Uint8Array(0);
|
|
590
|
+
},
|
|
591
|
+
expandFileStorage: function expandFileStorage(e, r) {
|
|
592
|
+
var t = e.contents ? e.contents.length : 0;
|
|
593
|
+
if (!(t >= r)) {
|
|
594
|
+
r = Math.max(r, t * (t < 1048576 ? 2 : 1.125) >>> 0), 0 != t && (r = Math.max(r, 256));
|
|
595
|
+
var n = e.contents;
|
|
596
|
+
e.contents = new Uint8Array(r), e.usedBytes > 0 && e.contents.set(n.subarray(0, e.usedBytes), 0);
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
resizeFileStorage: function resizeFileStorage(e, r) {
|
|
600
|
+
if (e.usedBytes != r) if (0 == r) e.contents = null, e.usedBytes = 0;else {
|
|
601
|
+
var t = e.contents;
|
|
602
|
+
e.contents = new Uint8Array(r), t && e.contents.set(t.subarray(0, Math.min(r, e.usedBytes))), e.usedBytes = r;
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
node_ops: {
|
|
606
|
+
getattr: function getattr(e) {
|
|
607
|
+
var r = {};
|
|
608
|
+
return r.dev = Ie.isChrdev(e.mode) ? e.id : 1, r.ino = e.id, r.mode = e.mode, r.nlink = 1, r.uid = 0, r.gid = 0, r.rdev = e.rdev, Ie.isDir(e.mode) ? r.size = 4096 : Ie.isFile(e.mode) ? r.size = e.usedBytes : Ie.isLink(e.mode) ? r.size = e.link.length : r.size = 0, r.atime = new Date(e.timestamp), r.mtime = new Date(e.timestamp), r.ctime = new Date(e.timestamp), r.blksize = 4096, r.blocks = Math.ceil(r.size / r.blksize), r;
|
|
609
|
+
},
|
|
610
|
+
setattr: function setattr(e, r) {
|
|
611
|
+
void 0 !== r.mode && (e.mode = r.mode), void 0 !== r.timestamp && (e.timestamp = r.timestamp), void 0 !== r.size && Re.resizeFileStorage(e, r.size);
|
|
612
|
+
},
|
|
613
|
+
lookup: function lookup(e, r) {
|
|
614
|
+
throw Ie.genericErrors[44];
|
|
615
|
+
},
|
|
616
|
+
mknod: function mknod(e, r, t, n) {
|
|
617
|
+
return Re.createNode(e, r, t, n);
|
|
618
|
+
},
|
|
619
|
+
rename: function rename(e, r, t) {
|
|
620
|
+
if (Ie.isDir(e.mode)) {
|
|
621
|
+
var n;
|
|
622
|
+
try {
|
|
623
|
+
n = Ie.lookupNode(r, t);
|
|
624
|
+
} catch (e) {}
|
|
625
|
+
if (n) for (var o in n.contents) throw new Ie.ErrnoError(55);
|
|
626
|
+
}
|
|
627
|
+
delete e.parent.contents[e.name], e.parent.timestamp = Date.now(), e.name = t, r.contents[t] = e, r.timestamp = e.parent.timestamp, e.parent = r;
|
|
628
|
+
},
|
|
629
|
+
unlink: function unlink(e, r) {
|
|
630
|
+
delete e.contents[r], e.timestamp = Date.now();
|
|
631
|
+
},
|
|
632
|
+
rmdir: function rmdir(e, r) {
|
|
633
|
+
var t = Ie.lookupNode(e, r);
|
|
634
|
+
for (var n in t.contents) throw new Ie.ErrnoError(55);
|
|
635
|
+
delete e.contents[r], e.timestamp = Date.now();
|
|
636
|
+
},
|
|
637
|
+
readdir: function readdir(e) {
|
|
638
|
+
var r = [".", ".."];
|
|
639
|
+
for (var t in e.contents) e.contents.hasOwnProperty(t) && r.push(t);
|
|
640
|
+
return r;
|
|
641
|
+
},
|
|
642
|
+
symlink: function symlink(e, r, t) {
|
|
643
|
+
var n = Re.createNode(e, r, 41471, 0);
|
|
644
|
+
return n.link = t, n;
|
|
645
|
+
},
|
|
646
|
+
readlink: function readlink(e) {
|
|
647
|
+
if (!Ie.isLink(e.mode)) throw new Ie.ErrnoError(28);
|
|
648
|
+
return e.link;
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
stream_ops: {
|
|
652
|
+
read: function read(e, r, t, n, o) {
|
|
653
|
+
var i = e.node.contents;
|
|
654
|
+
if (o >= e.node.usedBytes) return 0;
|
|
655
|
+
var a = Math.min(e.node.usedBytes - o, n);
|
|
656
|
+
if (F(a >= 0), a > 8 && i.subarray) r.set(i.subarray(o, o + a), t);else for (var s = 0; s < a; s++) r[t + s] = i[o + s];
|
|
657
|
+
return a;
|
|
658
|
+
},
|
|
659
|
+
write: function write(e, r, t, n, o, i) {
|
|
660
|
+
if (F(!(r instanceof ArrayBuffer)), r.buffer === x.buffer && (i = !1), !n) return 0;
|
|
661
|
+
var a = e.node;
|
|
662
|
+
if (a.timestamp = Date.now(), r.subarray && (!a.contents || a.contents.subarray)) {
|
|
663
|
+
if (i) return F(0 === o, "canOwn must imply no weird position inside the file"), a.contents = r.subarray(t, t + n), a.usedBytes = n, n;
|
|
664
|
+
if (0 === a.usedBytes && 0 === o) return a.contents = r.slice(t, t + n), a.usedBytes = n, n;
|
|
665
|
+
if (o + n <= a.usedBytes) return a.contents.set(r.subarray(t, t + n), o), n;
|
|
666
|
+
}
|
|
667
|
+
if (Re.expandFileStorage(a, o + n), a.contents.subarray && r.subarray) a.contents.set(r.subarray(t, t + n), o);else for (var s = 0; s < n; s++) a.contents[o + s] = r[t + s];
|
|
668
|
+
return a.usedBytes = Math.max(a.usedBytes, o + n), n;
|
|
669
|
+
},
|
|
670
|
+
llseek: function llseek(e, r, t) {
|
|
671
|
+
var n = r;
|
|
672
|
+
if (1 === t ? n += e.position : 2 === t && Ie.isFile(e.node.mode) && (n += e.node.usedBytes), n < 0) throw new Ie.ErrnoError(28);
|
|
673
|
+
return n;
|
|
674
|
+
},
|
|
675
|
+
allocate: function allocate(e, r, t) {
|
|
676
|
+
Re.expandFileStorage(e.node, r + t), e.node.usedBytes = Math.max(e.node.usedBytes, r + t);
|
|
677
|
+
},
|
|
678
|
+
mmap: function mmap(e, r, t, n, o, i) {
|
|
679
|
+
if (0 !== r) throw new Ie.ErrnoError(28);
|
|
680
|
+
if (!Ie.isFile(e.node.mode)) throw new Ie.ErrnoError(43);
|
|
681
|
+
var a,
|
|
682
|
+
s,
|
|
683
|
+
l = e.node.contents;
|
|
684
|
+
if (2 & i || l.buffer !== L) {
|
|
685
|
+
if ((n > 0 || n + t < l.length) && (l = l.subarray ? l.subarray(n, n + t) : Array.prototype.slice.call(l, n, n + t)), s = !0, !(a = Oe(t))) throw new Ie.ErrnoError(48);
|
|
686
|
+
x.set(l, a);
|
|
687
|
+
} else s = !1, a = l.byteOffset;
|
|
688
|
+
return {
|
|
689
|
+
ptr: a,
|
|
690
|
+
allocated: s
|
|
691
|
+
};
|
|
692
|
+
},
|
|
693
|
+
msync: function msync(e, r, t, n, o) {
|
|
694
|
+
if (!Ie.isFile(e.node.mode)) throw new Ie.ErrnoError(43);
|
|
695
|
+
return 2 & o || Re.stream_ops.write(e, r, 0, n, t, !1), 0;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
var Me = {
|
|
700
|
+
0: "Success",
|
|
701
|
+
1: "Arg list too long",
|
|
702
|
+
2: "Permission denied",
|
|
703
|
+
3: "Address already in use",
|
|
704
|
+
4: "Address not available",
|
|
705
|
+
5: "Address family not supported by protocol family",
|
|
706
|
+
6: "No more processes",
|
|
707
|
+
7: "Socket already connected",
|
|
708
|
+
8: "Bad file number",
|
|
709
|
+
9: "Trying to read unreadable message",
|
|
710
|
+
10: "Mount device busy",
|
|
711
|
+
11: "Operation canceled",
|
|
712
|
+
12: "No children",
|
|
713
|
+
13: "Connection aborted",
|
|
714
|
+
14: "Connection refused",
|
|
715
|
+
15: "Connection reset by peer",
|
|
716
|
+
16: "File locking deadlock error",
|
|
717
|
+
17: "Destination address required",
|
|
718
|
+
18: "Math arg out of domain of func",
|
|
719
|
+
19: "Quota exceeded",
|
|
720
|
+
20: "File exists",
|
|
721
|
+
21: "Bad address",
|
|
722
|
+
22: "File too large",
|
|
723
|
+
23: "Host is unreachable",
|
|
724
|
+
24: "Identifier removed",
|
|
725
|
+
25: "Illegal byte sequence",
|
|
726
|
+
26: "Connection already in progress",
|
|
727
|
+
27: "Interrupted system call",
|
|
728
|
+
28: "Invalid argument",
|
|
729
|
+
29: "I/O error",
|
|
730
|
+
30: "Socket is already connected",
|
|
731
|
+
31: "Is a directory",
|
|
732
|
+
32: "Too many symbolic links",
|
|
733
|
+
33: "Too many open files",
|
|
734
|
+
34: "Too many links",
|
|
735
|
+
35: "Message too long",
|
|
736
|
+
36: "Multihop attempted",
|
|
737
|
+
37: "File or path name too long",
|
|
738
|
+
38: "Network interface is not configured",
|
|
739
|
+
39: "Connection reset by network",
|
|
740
|
+
40: "Network is unreachable",
|
|
741
|
+
41: "Too many open files in system",
|
|
742
|
+
42: "No buffer space available",
|
|
743
|
+
43: "No such device",
|
|
744
|
+
44: "No such file or directory",
|
|
745
|
+
45: "Exec format error",
|
|
746
|
+
46: "No record locks available",
|
|
747
|
+
47: "The link has been severed",
|
|
748
|
+
48: "Not enough core",
|
|
749
|
+
49: "No message of desired type",
|
|
750
|
+
50: "Protocol not available",
|
|
751
|
+
51: "No space left on device",
|
|
752
|
+
52: "Function not implemented",
|
|
753
|
+
53: "Socket is not connected",
|
|
754
|
+
54: "Not a directory",
|
|
755
|
+
55: "Directory not empty",
|
|
756
|
+
56: "State not recoverable",
|
|
757
|
+
57: "Socket operation on non-socket",
|
|
758
|
+
59: "Not a typewriter",
|
|
759
|
+
60: "No such device or address",
|
|
760
|
+
61: "Value too large for defined data type",
|
|
761
|
+
62: "Previous owner died",
|
|
762
|
+
63: "Not super-user",
|
|
763
|
+
64: "Broken pipe",
|
|
764
|
+
65: "Protocol error",
|
|
765
|
+
66: "Unknown protocol",
|
|
766
|
+
67: "Protocol wrong type for socket",
|
|
767
|
+
68: "Math result not representable",
|
|
768
|
+
69: "Read only file system",
|
|
769
|
+
70: "Illegal seek",
|
|
770
|
+
71: "No such process",
|
|
771
|
+
72: "Stale file handle",
|
|
772
|
+
73: "Connection timed out",
|
|
773
|
+
74: "Text file busy",
|
|
774
|
+
75: "Cross-device link",
|
|
775
|
+
100: "Device not a stream",
|
|
776
|
+
101: "Bad font file fmt",
|
|
777
|
+
102: "Invalid slot",
|
|
778
|
+
103: "Invalid request code",
|
|
779
|
+
104: "No anode",
|
|
780
|
+
105: "Block device required",
|
|
781
|
+
106: "Channel number out of range",
|
|
782
|
+
107: "Level 3 halted",
|
|
783
|
+
108: "Level 3 reset",
|
|
784
|
+
109: "Link number out of range",
|
|
785
|
+
110: "Protocol driver not attached",
|
|
786
|
+
111: "No CSI structure available",
|
|
787
|
+
112: "Level 2 halted",
|
|
788
|
+
113: "Invalid exchange",
|
|
789
|
+
114: "Invalid request descriptor",
|
|
790
|
+
115: "Exchange full",
|
|
791
|
+
116: "No data (for no delay io)",
|
|
792
|
+
117: "Timer expired",
|
|
793
|
+
118: "Out of streams resources",
|
|
794
|
+
119: "Machine is not on the network",
|
|
795
|
+
120: "Package not installed",
|
|
796
|
+
121: "The object is remote",
|
|
797
|
+
122: "Advertise error",
|
|
798
|
+
123: "Srmount error",
|
|
799
|
+
124: "Communication error on send",
|
|
800
|
+
125: "Cross mount point (not really error)",
|
|
801
|
+
126: "Given log. name not unique",
|
|
802
|
+
127: "f.d. invalid for this operation",
|
|
803
|
+
128: "Remote address changed",
|
|
804
|
+
129: "Can access a needed shared lib",
|
|
805
|
+
130: "Accessing a corrupted shared lib",
|
|
806
|
+
131: ".lib section in a.out corrupted",
|
|
807
|
+
132: "Attempting to link in too many libs",
|
|
808
|
+
133: "Attempting to exec a shared library",
|
|
809
|
+
135: "Streams pipe error",
|
|
810
|
+
136: "Too many users",
|
|
811
|
+
137: "Socket type not supported",
|
|
812
|
+
138: "Not supported",
|
|
813
|
+
139: "Protocol family not supported",
|
|
814
|
+
140: "Can't send after socket shutdown",
|
|
815
|
+
141: "Too many references",
|
|
816
|
+
142: "Host is down",
|
|
817
|
+
148: "No medium (in tape drive)",
|
|
818
|
+
156: "Level 2 not synchronized"
|
|
819
|
+
},
|
|
820
|
+
Ne = {},
|
|
821
|
+
Ie = {
|
|
822
|
+
root: null,
|
|
823
|
+
mounts: [],
|
|
824
|
+
devices: {},
|
|
825
|
+
streams: [],
|
|
826
|
+
nextInode: 1,
|
|
827
|
+
nameTable: null,
|
|
828
|
+
currentPath: "/",
|
|
829
|
+
initialized: !1,
|
|
830
|
+
ignorePermissions: !0,
|
|
831
|
+
ErrnoError: null,
|
|
832
|
+
genericErrors: {},
|
|
833
|
+
filesystems: null,
|
|
834
|
+
syncFSRequests: 0,
|
|
835
|
+
lookupPath: function lookupPath(e) {
|
|
836
|
+
var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
837
|
+
if (!(e = Fe.resolve(Ie.cwd(), e))) return {
|
|
838
|
+
path: "",
|
|
839
|
+
node: null
|
|
840
|
+
};
|
|
841
|
+
var t = {
|
|
842
|
+
follow_mount: !0,
|
|
843
|
+
recurse_count: 0
|
|
844
|
+
};
|
|
845
|
+
if (r = Object.assign(t, r), r.recurse_count > 8) throw new Ie.ErrnoError(32);
|
|
846
|
+
for (var n = Ae.normalizeArray(e.split("/").filter(function (e) {
|
|
847
|
+
return !!e;
|
|
848
|
+
}), !1), o = Ie.root, i = "/", a = 0; a < n.length; a++) {
|
|
849
|
+
var s = a === n.length - 1;
|
|
850
|
+
if (s && r.parent) break;
|
|
851
|
+
if (o = Ie.lookupNode(o, n[a]), i = Ae.join2(i, n[a]), Ie.isMountpoint(o) && (!s || s && r.follow_mount) && (o = o.mounted.root), !s || r.follow) for (var l = 0; Ie.isLink(o.mode);) {
|
|
852
|
+
var u = Ie.readlink(i);
|
|
853
|
+
i = Fe.resolve(Ae.dirname(i), u);
|
|
854
|
+
var c = Ie.lookupPath(i, {
|
|
855
|
+
recurse_count: r.recurse_count + 1
|
|
856
|
+
});
|
|
857
|
+
if (o = c.node, l++ > 40) throw new Ie.ErrnoError(32);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
return {
|
|
861
|
+
path: i,
|
|
862
|
+
node: o
|
|
863
|
+
};
|
|
864
|
+
},
|
|
865
|
+
getPath: function getPath(e) {
|
|
866
|
+
for (var r;;) {
|
|
867
|
+
if (Ie.isRoot(e)) {
|
|
868
|
+
var t = e.mount.mountpoint;
|
|
869
|
+
return r ? "/" !== t[t.length - 1] ? t + "/" + r : t + r : t;
|
|
870
|
+
}
|
|
871
|
+
r = r ? e.name + "/" + r : e.name, e = e.parent;
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
hashName: function hashName(e, r) {
|
|
875
|
+
for (var t = 0, n = 0; n < r.length; n++) t = (t << 5) - t + r.charCodeAt(n) | 0;
|
|
876
|
+
return (e + t >>> 0) % Ie.nameTable.length;
|
|
877
|
+
},
|
|
878
|
+
hashAddNode: function hashAddNode(e) {
|
|
879
|
+
var r = Ie.hashName(e.parent.id, e.name);
|
|
880
|
+
e.name_next = Ie.nameTable[r], Ie.nameTable[r] = e;
|
|
881
|
+
},
|
|
882
|
+
hashRemoveNode: function hashRemoveNode(e) {
|
|
883
|
+
var r = Ie.hashName(e.parent.id, e.name);
|
|
884
|
+
if (Ie.nameTable[r] === e) Ie.nameTable[r] = e.name_next;else for (var t = Ie.nameTable[r]; t;) {
|
|
885
|
+
if (t.name_next === e) {
|
|
886
|
+
t.name_next = e.name_next;
|
|
887
|
+
break;
|
|
888
|
+
}
|
|
889
|
+
t = t.name_next;
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
lookupNode: function lookupNode(e, r) {
|
|
893
|
+
var t = Ie.mayLookup(e);
|
|
894
|
+
if (t) throw new Ie.ErrnoError(t, e);
|
|
895
|
+
for (var n = Ie.hashName(e.id, r), o = Ie.nameTable[n]; o; o = o.name_next) {
|
|
896
|
+
var i = o.name;
|
|
897
|
+
if (o.parent.id === e.id && i === r) return o;
|
|
898
|
+
}
|
|
899
|
+
return Ie.lookup(e, r);
|
|
900
|
+
},
|
|
901
|
+
createNode: function createNode(e, r, t, n) {
|
|
902
|
+
F("object" == _typeof(e));
|
|
903
|
+
var o = new Ie.FSNode(e, r, t, n);
|
|
904
|
+
return Ie.hashAddNode(o), o;
|
|
905
|
+
},
|
|
906
|
+
destroyNode: function destroyNode(e) {
|
|
907
|
+
Ie.hashRemoveNode(e);
|
|
908
|
+
},
|
|
909
|
+
isRoot: function isRoot(e) {
|
|
910
|
+
return e === e.parent;
|
|
911
|
+
},
|
|
912
|
+
isMountpoint: function isMountpoint(e) {
|
|
913
|
+
return !!e.mounted;
|
|
914
|
+
},
|
|
915
|
+
isFile: function isFile(e) {
|
|
916
|
+
return 32768 == (61440 & e);
|
|
917
|
+
},
|
|
918
|
+
isDir: function isDir(e) {
|
|
919
|
+
return 16384 == (61440 & e);
|
|
920
|
+
},
|
|
921
|
+
isLink: function isLink(e) {
|
|
922
|
+
return 40960 == (61440 & e);
|
|
923
|
+
},
|
|
924
|
+
isChrdev: function isChrdev(e) {
|
|
925
|
+
return 8192 == (61440 & e);
|
|
926
|
+
},
|
|
927
|
+
isBlkdev: function isBlkdev(e) {
|
|
928
|
+
return 24576 == (61440 & e);
|
|
929
|
+
},
|
|
930
|
+
isFIFO: function isFIFO(e) {
|
|
931
|
+
return 4096 == (61440 & e);
|
|
932
|
+
},
|
|
933
|
+
isSocket: function isSocket(e) {
|
|
934
|
+
return 49152 == (49152 & e);
|
|
935
|
+
},
|
|
936
|
+
flagModes: {
|
|
937
|
+
r: 0,
|
|
938
|
+
"r+": 2,
|
|
939
|
+
w: 577,
|
|
940
|
+
"w+": 578,
|
|
941
|
+
a: 1089,
|
|
942
|
+
"a+": 1090
|
|
943
|
+
},
|
|
944
|
+
modeStringToFlags: function modeStringToFlags(e) {
|
|
945
|
+
var r = Ie.flagModes[e];
|
|
946
|
+
if (void 0 === r) throw new Error("Unknown file open mode: " + e);
|
|
947
|
+
return r;
|
|
948
|
+
},
|
|
949
|
+
flagsToPermissionString: function flagsToPermissionString(e) {
|
|
950
|
+
var r = ["r", "w", "rw"][3 & e];
|
|
951
|
+
return 512 & e && (r += "w"), r;
|
|
952
|
+
},
|
|
953
|
+
nodePermissions: function nodePermissions(e, r) {
|
|
954
|
+
return Ie.ignorePermissions || (!r.includes("r") || 292 & e.mode) && (!r.includes("w") || 146 & e.mode) && (!r.includes("x") || 73 & e.mode) ? 0 : 2;
|
|
955
|
+
},
|
|
956
|
+
mayLookup: function mayLookup(e) {
|
|
957
|
+
var r = Ie.nodePermissions(e, "x");
|
|
958
|
+
return r || (e.node_ops.lookup ? 0 : 2);
|
|
959
|
+
},
|
|
960
|
+
mayCreate: function mayCreate(e, r) {
|
|
961
|
+
try {
|
|
962
|
+
Ie.lookupNode(e, r);
|
|
963
|
+
return 20;
|
|
964
|
+
} catch (e) {}
|
|
965
|
+
return Ie.nodePermissions(e, "wx");
|
|
966
|
+
},
|
|
967
|
+
mayDelete: function mayDelete(e, r, t) {
|
|
968
|
+
var n;
|
|
969
|
+
try {
|
|
970
|
+
n = Ie.lookupNode(e, r);
|
|
971
|
+
} catch (e) {
|
|
972
|
+
return e.errno;
|
|
973
|
+
}
|
|
974
|
+
var o = Ie.nodePermissions(e, "wx");
|
|
975
|
+
if (o) return o;
|
|
976
|
+
if (t) {
|
|
977
|
+
if (!Ie.isDir(n.mode)) return 54;
|
|
978
|
+
if (Ie.isRoot(n) || Ie.getPath(n) === Ie.cwd()) return 10;
|
|
979
|
+
} else if (Ie.isDir(n.mode)) return 31;
|
|
980
|
+
return 0;
|
|
981
|
+
},
|
|
982
|
+
mayOpen: function mayOpen(e, r) {
|
|
983
|
+
return e ? Ie.isLink(e.mode) ? 32 : Ie.isDir(e.mode) && ("r" !== Ie.flagsToPermissionString(r) || 512 & r) ? 31 : Ie.nodePermissions(e, Ie.flagsToPermissionString(r)) : 44;
|
|
984
|
+
},
|
|
985
|
+
MAX_OPEN_FDS: 4096,
|
|
986
|
+
nextfd: function nextfd() {
|
|
987
|
+
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
|
|
988
|
+
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Ie.MAX_OPEN_FDS;
|
|
989
|
+
for (var t = e; t <= r; t++) if (!Ie.streams[t]) return t;
|
|
990
|
+
throw new Ie.ErrnoError(33);
|
|
991
|
+
},
|
|
992
|
+
getStream: function getStream(e) {
|
|
993
|
+
return Ie.streams[e];
|
|
994
|
+
},
|
|
995
|
+
createStream: function createStream(e, r, t) {
|
|
996
|
+
Ie.FSStream || (Ie.FSStream = function () {
|
|
997
|
+
this.shared = {};
|
|
998
|
+
}, Ie.FSStream.prototype = {
|
|
999
|
+
object: {
|
|
1000
|
+
get: function get() {
|
|
1001
|
+
return this.node;
|
|
1002
|
+
},
|
|
1003
|
+
set: function set(e) {
|
|
1004
|
+
this.node = e;
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
isRead: {
|
|
1008
|
+
get: function get() {
|
|
1009
|
+
return 1 != (2097155 & this.flags);
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
isWrite: {
|
|
1013
|
+
get: function get() {
|
|
1014
|
+
return 0 != (2097155 & this.flags);
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
isAppend: {
|
|
1018
|
+
get: function get() {
|
|
1019
|
+
return 1024 & this.flags;
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
flags: {
|
|
1023
|
+
get: function get() {
|
|
1024
|
+
return this.shared.flags;
|
|
1025
|
+
},
|
|
1026
|
+
set: function set(e) {
|
|
1027
|
+
this.shared.flags = e;
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
position: {
|
|
1031
|
+
get function() {
|
|
1032
|
+
return this.shared.position;
|
|
1033
|
+
},
|
|
1034
|
+
set: function set(e) {
|
|
1035
|
+
this.shared.position = e;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}), e = Object.assign(new Ie.FSStream(), e);
|
|
1039
|
+
var n = Ie.nextfd(r, t);
|
|
1040
|
+
return e.fd = n, Ie.streams[n] = e, e;
|
|
1041
|
+
},
|
|
1042
|
+
closeStream: function closeStream(e) {
|
|
1043
|
+
Ie.streams[e] = null;
|
|
1044
|
+
},
|
|
1045
|
+
chrdev_stream_ops: {
|
|
1046
|
+
open: function open(e) {
|
|
1047
|
+
var r = Ie.getDevice(e.node.rdev);
|
|
1048
|
+
e.stream_ops = r.stream_ops, e.stream_ops.open && e.stream_ops.open(e);
|
|
1049
|
+
},
|
|
1050
|
+
llseek: function llseek() {
|
|
1051
|
+
throw new Ie.ErrnoError(70);
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
major: function major(e) {
|
|
1055
|
+
return e >> 8;
|
|
1056
|
+
},
|
|
1057
|
+
minor: function minor(e) {
|
|
1058
|
+
return 255 & e;
|
|
1059
|
+
},
|
|
1060
|
+
makedev: function makedev(e, r) {
|
|
1061
|
+
return e << 8 | r;
|
|
1062
|
+
},
|
|
1063
|
+
registerDevice: function registerDevice(e, r) {
|
|
1064
|
+
Ie.devices[e] = {
|
|
1065
|
+
stream_ops: r
|
|
1066
|
+
};
|
|
1067
|
+
},
|
|
1068
|
+
getDevice: function getDevice(e) {
|
|
1069
|
+
return Ie.devices[e];
|
|
1070
|
+
},
|
|
1071
|
+
getMounts: function getMounts(e) {
|
|
1072
|
+
for (var r = [], t = [e]; t.length;) {
|
|
1073
|
+
var n = t.pop();
|
|
1074
|
+
r.push(n), t.push.apply(t, n.mounts);
|
|
1075
|
+
}
|
|
1076
|
+
return r;
|
|
1077
|
+
},
|
|
1078
|
+
syncfs: function syncfs(e, r) {
|
|
1079
|
+
"function" == typeof e && (r = e, e = !1), Ie.syncFSRequests++, Ie.syncFSRequests > 1 && _("warning: " + Ie.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work");
|
|
1080
|
+
var t = Ie.getMounts(Ie.root.mount),
|
|
1081
|
+
n = 0;
|
|
1082
|
+
function o(e) {
|
|
1083
|
+
return F(Ie.syncFSRequests > 0), Ie.syncFSRequests--, r(e);
|
|
1084
|
+
}
|
|
1085
|
+
function i(e) {
|
|
1086
|
+
if (e) return i.errored ? void 0 : (i.errored = !0, o(e));
|
|
1087
|
+
++n >= t.length && o(null);
|
|
1088
|
+
}
|
|
1089
|
+
t.forEach(function (r) {
|
|
1090
|
+
if (!r.type.syncfs) return i(null);
|
|
1091
|
+
r.type.syncfs(r, e, i);
|
|
1092
|
+
});
|
|
1093
|
+
},
|
|
1094
|
+
mount: function mount(e, r, t) {
|
|
1095
|
+
if ("string" == typeof e) throw e;
|
|
1096
|
+
var n,
|
|
1097
|
+
o = "/" === t,
|
|
1098
|
+
i = !t;
|
|
1099
|
+
if (o && Ie.root) throw new Ie.ErrnoError(10);
|
|
1100
|
+
if (!o && !i) {
|
|
1101
|
+
var a = Ie.lookupPath(t, {
|
|
1102
|
+
follow_mount: !1
|
|
1103
|
+
});
|
|
1104
|
+
if (t = a.path, n = a.node, Ie.isMountpoint(n)) throw new Ie.ErrnoError(10);
|
|
1105
|
+
if (!Ie.isDir(n.mode)) throw new Ie.ErrnoError(54);
|
|
1106
|
+
}
|
|
1107
|
+
var s = {
|
|
1108
|
+
type: e,
|
|
1109
|
+
opts: r,
|
|
1110
|
+
mountpoint: t,
|
|
1111
|
+
mounts: []
|
|
1112
|
+
},
|
|
1113
|
+
l = e.mount(s);
|
|
1114
|
+
return l.mount = s, s.root = l, o ? Ie.root = l : n && (n.mounted = s, n.mount && n.mount.mounts.push(s)), l;
|
|
1115
|
+
},
|
|
1116
|
+
unmount: function unmount(e) {
|
|
1117
|
+
var r = Ie.lookupPath(e, {
|
|
1118
|
+
follow_mount: !1
|
|
1119
|
+
});
|
|
1120
|
+
if (!Ie.isMountpoint(r.node)) throw new Ie.ErrnoError(28);
|
|
1121
|
+
var t = r.node,
|
|
1122
|
+
n = t.mounted,
|
|
1123
|
+
o = Ie.getMounts(n);
|
|
1124
|
+
Object.keys(Ie.nameTable).forEach(function (e) {
|
|
1125
|
+
for (var r = Ie.nameTable[e]; r;) {
|
|
1126
|
+
var t = r.name_next;
|
|
1127
|
+
o.includes(r.mount) && Ie.destroyNode(r), r = t;
|
|
1128
|
+
}
|
|
1129
|
+
}), t.mounted = null;
|
|
1130
|
+
var i = t.mount.mounts.indexOf(n);
|
|
1131
|
+
F(-1 !== i), t.mount.mounts.splice(i, 1);
|
|
1132
|
+
},
|
|
1133
|
+
lookup: function lookup(e, r) {
|
|
1134
|
+
return e.node_ops.lookup(e, r);
|
|
1135
|
+
},
|
|
1136
|
+
mknod: function mknod(e, r, t) {
|
|
1137
|
+
var n = Ie.lookupPath(e, {
|
|
1138
|
+
parent: !0
|
|
1139
|
+
}).node,
|
|
1140
|
+
o = Ae.basename(e);
|
|
1141
|
+
if (!o || "." === o || ".." === o) throw new Ie.ErrnoError(28);
|
|
1142
|
+
var i = Ie.mayCreate(n, o);
|
|
1143
|
+
if (i) throw new Ie.ErrnoError(i);
|
|
1144
|
+
if (!n.node_ops.mknod) throw new Ie.ErrnoError(63);
|
|
1145
|
+
return n.node_ops.mknod(n, o, r, t);
|
|
1146
|
+
},
|
|
1147
|
+
create: function create(e, r) {
|
|
1148
|
+
return r = void 0 !== r ? r : 438, r &= 4095, r |= 32768, Ie.mknod(e, r, 0);
|
|
1149
|
+
},
|
|
1150
|
+
mkdir: function mkdir(e, r) {
|
|
1151
|
+
return r = void 0 !== r ? r : 511, r &= 1023, r |= 16384, Ie.mknod(e, r, 0);
|
|
1152
|
+
},
|
|
1153
|
+
mkdirTree: function mkdirTree(e, r) {
|
|
1154
|
+
for (var t = e.split("/"), n = "", o = 0; o < t.length; ++o) if (t[o]) {
|
|
1155
|
+
n += "/" + t[o];
|
|
1156
|
+
try {
|
|
1157
|
+
Ie.mkdir(n, r);
|
|
1158
|
+
} catch (e) {
|
|
1159
|
+
if (20 != e.errno) throw e;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
mkdev: function mkdev(e, r, t) {
|
|
1164
|
+
return void 0 === t && (t = r, r = 438), r |= 8192, Ie.mknod(e, r, t);
|
|
1165
|
+
},
|
|
1166
|
+
symlink: function symlink(e, r) {
|
|
1167
|
+
if (!Fe.resolve(e)) throw new Ie.ErrnoError(44);
|
|
1168
|
+
var t = Ie.lookupPath(r, {
|
|
1169
|
+
parent: !0
|
|
1170
|
+
}).node;
|
|
1171
|
+
if (!t) throw new Ie.ErrnoError(44);
|
|
1172
|
+
var n = Ae.basename(r),
|
|
1173
|
+
o = Ie.mayCreate(t, n);
|
|
1174
|
+
if (o) throw new Ie.ErrnoError(o);
|
|
1175
|
+
if (!t.node_ops.symlink) throw new Ie.ErrnoError(63);
|
|
1176
|
+
return t.node_ops.symlink(t, n, e);
|
|
1177
|
+
},
|
|
1178
|
+
rename: function rename(e, r) {
|
|
1179
|
+
var t,
|
|
1180
|
+
n,
|
|
1181
|
+
o = Ae.dirname(e),
|
|
1182
|
+
i = Ae.dirname(r),
|
|
1183
|
+
a = Ae.basename(e),
|
|
1184
|
+
s = Ae.basename(r);
|
|
1185
|
+
if (t = Ie.lookupPath(e, {
|
|
1186
|
+
parent: !0
|
|
1187
|
+
}).node, n = Ie.lookupPath(r, {
|
|
1188
|
+
parent: !0
|
|
1189
|
+
}).node, !t || !n) throw new Ie.ErrnoError(44);
|
|
1190
|
+
if (t.mount !== n.mount) throw new Ie.ErrnoError(75);
|
|
1191
|
+
var l,
|
|
1192
|
+
u = Ie.lookupNode(t, a),
|
|
1193
|
+
c = Fe.relative(e, i);
|
|
1194
|
+
if ("." !== c.charAt(0)) throw new Ie.ErrnoError(28);
|
|
1195
|
+
if ("." !== (c = Fe.relative(r, o)).charAt(0)) throw new Ie.ErrnoError(55);
|
|
1196
|
+
try {
|
|
1197
|
+
l = Ie.lookupNode(n, s);
|
|
1198
|
+
} catch (e) {}
|
|
1199
|
+
if (u !== l) {
|
|
1200
|
+
var d = Ie.isDir(u.mode),
|
|
1201
|
+
f = Ie.mayDelete(t, a, d);
|
|
1202
|
+
if (f) throw new Ie.ErrnoError(f);
|
|
1203
|
+
if (f = l ? Ie.mayDelete(n, s, d) : Ie.mayCreate(n, s)) throw new Ie.ErrnoError(f);
|
|
1204
|
+
if (!t.node_ops.rename) throw new Ie.ErrnoError(63);
|
|
1205
|
+
if (Ie.isMountpoint(u) || l && Ie.isMountpoint(l)) throw new Ie.ErrnoError(10);
|
|
1206
|
+
if (n !== t && (f = Ie.nodePermissions(t, "w"))) throw new Ie.ErrnoError(f);
|
|
1207
|
+
Ie.hashRemoveNode(u);
|
|
1208
|
+
try {
|
|
1209
|
+
t.node_ops.rename(u, n, s);
|
|
1210
|
+
} catch (e) {
|
|
1211
|
+
throw e;
|
|
1212
|
+
} finally {
|
|
1213
|
+
Ie.hashAddNode(u);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
rmdir: function rmdir(e) {
|
|
1218
|
+
var r = Ie.lookupPath(e, {
|
|
1219
|
+
parent: !0
|
|
1220
|
+
}).node,
|
|
1221
|
+
t = Ae.basename(e),
|
|
1222
|
+
n = Ie.lookupNode(r, t),
|
|
1223
|
+
o = Ie.mayDelete(r, t, !0);
|
|
1224
|
+
if (o) throw new Ie.ErrnoError(o);
|
|
1225
|
+
if (!r.node_ops.rmdir) throw new Ie.ErrnoError(63);
|
|
1226
|
+
if (Ie.isMountpoint(n)) throw new Ie.ErrnoError(10);
|
|
1227
|
+
r.node_ops.rmdir(r, t), Ie.destroyNode(n);
|
|
1228
|
+
},
|
|
1229
|
+
readdir: function readdir(e) {
|
|
1230
|
+
var r = Ie.lookupPath(e, {
|
|
1231
|
+
follow: !0
|
|
1232
|
+
}).node;
|
|
1233
|
+
if (!r.node_ops.readdir) throw new Ie.ErrnoError(54);
|
|
1234
|
+
return r.node_ops.readdir(r);
|
|
1235
|
+
},
|
|
1236
|
+
unlink: function unlink(e) {
|
|
1237
|
+
var r = Ie.lookupPath(e, {
|
|
1238
|
+
parent: !0
|
|
1239
|
+
}).node;
|
|
1240
|
+
if (!r) throw new Ie.ErrnoError(44);
|
|
1241
|
+
var t = Ae.basename(e),
|
|
1242
|
+
n = Ie.lookupNode(r, t),
|
|
1243
|
+
o = Ie.mayDelete(r, t, !1);
|
|
1244
|
+
if (o) throw new Ie.ErrnoError(o);
|
|
1245
|
+
if (!r.node_ops.unlink) throw new Ie.ErrnoError(63);
|
|
1246
|
+
if (Ie.isMountpoint(n)) throw new Ie.ErrnoError(10);
|
|
1247
|
+
r.node_ops.unlink(r, t), Ie.destroyNode(n);
|
|
1248
|
+
},
|
|
1249
|
+
readlink: function readlink(e) {
|
|
1250
|
+
var r = Ie.lookupPath(e).node;
|
|
1251
|
+
if (!r) throw new Ie.ErrnoError(44);
|
|
1252
|
+
if (!r.node_ops.readlink) throw new Ie.ErrnoError(28);
|
|
1253
|
+
return Fe.resolve(Ie.getPath(r.parent), r.node_ops.readlink(r));
|
|
1254
|
+
},
|
|
1255
|
+
stat: function stat(e, r) {
|
|
1256
|
+
var t = Ie.lookupPath(e, {
|
|
1257
|
+
follow: !r
|
|
1258
|
+
}).node;
|
|
1259
|
+
if (!t) throw new Ie.ErrnoError(44);
|
|
1260
|
+
if (!t.node_ops.getattr) throw new Ie.ErrnoError(63);
|
|
1261
|
+
return t.node_ops.getattr(t);
|
|
1262
|
+
},
|
|
1263
|
+
lstat: function lstat(e) {
|
|
1264
|
+
return Ie.stat(e, !0);
|
|
1265
|
+
},
|
|
1266
|
+
chmod: function chmod(e, r, t) {
|
|
1267
|
+
var n;
|
|
1268
|
+
"string" == typeof e ? n = Ie.lookupPath(e, {
|
|
1269
|
+
follow: !t
|
|
1270
|
+
}).node : n = e;
|
|
1271
|
+
if (!n.node_ops.setattr) throw new Ie.ErrnoError(63);
|
|
1272
|
+
n.node_ops.setattr(n, {
|
|
1273
|
+
mode: 4095 & r | -4096 & n.mode,
|
|
1274
|
+
timestamp: Date.now()
|
|
1275
|
+
});
|
|
1276
|
+
},
|
|
1277
|
+
lchmod: function lchmod(e, r) {
|
|
1278
|
+
Ie.chmod(e, r, !0);
|
|
1279
|
+
},
|
|
1280
|
+
fchmod: function fchmod(e, r) {
|
|
1281
|
+
var t = Ie.getStream(e);
|
|
1282
|
+
if (!t) throw new Ie.ErrnoError(8);
|
|
1283
|
+
Ie.chmod(t.node, r);
|
|
1284
|
+
},
|
|
1285
|
+
chown: function chown(e, r, t, n) {
|
|
1286
|
+
var o;
|
|
1287
|
+
"string" == typeof e ? o = Ie.lookupPath(e, {
|
|
1288
|
+
follow: !n
|
|
1289
|
+
}).node : o = e;
|
|
1290
|
+
if (!o.node_ops.setattr) throw new Ie.ErrnoError(63);
|
|
1291
|
+
o.node_ops.setattr(o, {
|
|
1292
|
+
timestamp: Date.now()
|
|
1293
|
+
});
|
|
1294
|
+
},
|
|
1295
|
+
lchown: function lchown(e, r, t) {
|
|
1296
|
+
Ie.chown(e, r, t, !0);
|
|
1297
|
+
},
|
|
1298
|
+
fchown: function fchown(e, r, t) {
|
|
1299
|
+
var n = Ie.getStream(e);
|
|
1300
|
+
if (!n) throw new Ie.ErrnoError(8);
|
|
1301
|
+
Ie.chown(n.node, r, t);
|
|
1302
|
+
},
|
|
1303
|
+
truncate: function truncate(e, r) {
|
|
1304
|
+
if (r < 0) throw new Ie.ErrnoError(28);
|
|
1305
|
+
var t;
|
|
1306
|
+
"string" == typeof e ? t = Ie.lookupPath(e, {
|
|
1307
|
+
follow: !0
|
|
1308
|
+
}).node : t = e;
|
|
1309
|
+
if (!t.node_ops.setattr) throw new Ie.ErrnoError(63);
|
|
1310
|
+
if (Ie.isDir(t.mode)) throw new Ie.ErrnoError(31);
|
|
1311
|
+
if (!Ie.isFile(t.mode)) throw new Ie.ErrnoError(28);
|
|
1312
|
+
var n = Ie.nodePermissions(t, "w");
|
|
1313
|
+
if (n) throw new Ie.ErrnoError(n);
|
|
1314
|
+
t.node_ops.setattr(t, {
|
|
1315
|
+
size: r,
|
|
1316
|
+
timestamp: Date.now()
|
|
1317
|
+
});
|
|
1318
|
+
},
|
|
1319
|
+
ftruncate: function ftruncate(e, r) {
|
|
1320
|
+
var t = Ie.getStream(e);
|
|
1321
|
+
if (!t) throw new Ie.ErrnoError(8);
|
|
1322
|
+
if (0 == (2097155 & t.flags)) throw new Ie.ErrnoError(28);
|
|
1323
|
+
Ie.truncate(t.node, r);
|
|
1324
|
+
},
|
|
1325
|
+
utime: function utime(e, r, t) {
|
|
1326
|
+
var n = Ie.lookupPath(e, {
|
|
1327
|
+
follow: !0
|
|
1328
|
+
}).node;
|
|
1329
|
+
n.node_ops.setattr(n, {
|
|
1330
|
+
timestamp: Math.max(r, t)
|
|
1331
|
+
});
|
|
1332
|
+
},
|
|
1333
|
+
open: function open(e, t, n, o, i) {
|
|
1334
|
+
if ("" === e) throw new Ie.ErrnoError(44);
|
|
1335
|
+
var a;
|
|
1336
|
+
if (n = void 0 === n ? 438 : n, n = 64 & (t = "string" == typeof t ? Ie.modeStringToFlags(t) : t) ? 4095 & n | 32768 : 0, "object" == _typeof(e)) a = e;else {
|
|
1337
|
+
e = Ae.normalize(e);
|
|
1338
|
+
try {
|
|
1339
|
+
a = Ie.lookupPath(e, {
|
|
1340
|
+
follow: !(131072 & t)
|
|
1341
|
+
}).node;
|
|
1342
|
+
} catch (e) {}
|
|
1343
|
+
}
|
|
1344
|
+
var s = !1;
|
|
1345
|
+
if (64 & t) if (a) {
|
|
1346
|
+
if (128 & t) throw new Ie.ErrnoError(20);
|
|
1347
|
+
} else a = Ie.mknod(e, n, 0), s = !0;
|
|
1348
|
+
if (!a) throw new Ie.ErrnoError(44);
|
|
1349
|
+
if (Ie.isChrdev(a.mode) && (t &= -513), 65536 & t && !Ie.isDir(a.mode)) throw new Ie.ErrnoError(54);
|
|
1350
|
+
if (!s) {
|
|
1351
|
+
var l = Ie.mayOpen(a, t);
|
|
1352
|
+
if (l) throw new Ie.ErrnoError(l);
|
|
1353
|
+
}
|
|
1354
|
+
512 & t && Ie.truncate(a, 0), t &= -131713;
|
|
1355
|
+
var u = Ie.createStream({
|
|
1356
|
+
node: a,
|
|
1357
|
+
path: Ie.getPath(a),
|
|
1358
|
+
flags: t,
|
|
1359
|
+
seekable: !0,
|
|
1360
|
+
position: 0,
|
|
1361
|
+
stream_ops: a.stream_ops,
|
|
1362
|
+
ungotten: [],
|
|
1363
|
+
error: !1
|
|
1364
|
+
}, o, i);
|
|
1365
|
+
return u.stream_ops.open && u.stream_ops.open(u), !r.logReadFiles || 1 & t || (Ie.readFiles || (Ie.readFiles = {}), e in Ie.readFiles || (Ie.readFiles[e] = 1)), u;
|
|
1366
|
+
},
|
|
1367
|
+
close: function close(e) {
|
|
1368
|
+
if (Ie.isClosed(e)) throw new Ie.ErrnoError(8);
|
|
1369
|
+
e.getdents && (e.getdents = null);
|
|
1370
|
+
try {
|
|
1371
|
+
e.stream_ops.close && e.stream_ops.close(e);
|
|
1372
|
+
} catch (e) {
|
|
1373
|
+
throw e;
|
|
1374
|
+
} finally {
|
|
1375
|
+
Ie.closeStream(e.fd);
|
|
1376
|
+
}
|
|
1377
|
+
e.fd = null;
|
|
1378
|
+
},
|
|
1379
|
+
isClosed: function isClosed(e) {
|
|
1380
|
+
return null === e.fd;
|
|
1381
|
+
},
|
|
1382
|
+
llseek: function llseek(e, r, t) {
|
|
1383
|
+
if (Ie.isClosed(e)) throw new Ie.ErrnoError(8);
|
|
1384
|
+
if (!e.seekable || !e.stream_ops.llseek) throw new Ie.ErrnoError(70);
|
|
1385
|
+
if (0 != t && 1 != t && 2 != t) throw new Ie.ErrnoError(28);
|
|
1386
|
+
return e.position = e.stream_ops.llseek(e, r, t), e.ungotten = [], e.position;
|
|
1387
|
+
},
|
|
1388
|
+
read: function read(e, r, t, n, o) {
|
|
1389
|
+
if (n < 0 || o < 0) throw new Ie.ErrnoError(28);
|
|
1390
|
+
if (Ie.isClosed(e)) throw new Ie.ErrnoError(8);
|
|
1391
|
+
if (1 == (2097155 & e.flags)) throw new Ie.ErrnoError(8);
|
|
1392
|
+
if (Ie.isDir(e.node.mode)) throw new Ie.ErrnoError(31);
|
|
1393
|
+
if (!e.stream_ops.read) throw new Ie.ErrnoError(28);
|
|
1394
|
+
var i = void 0 !== o;
|
|
1395
|
+
if (i) {
|
|
1396
|
+
if (!e.seekable) throw new Ie.ErrnoError(70);
|
|
1397
|
+
} else o = e.position;
|
|
1398
|
+
var a = e.stream_ops.read(e, r, t, n, o);
|
|
1399
|
+
return i || (e.position += a), a;
|
|
1400
|
+
},
|
|
1401
|
+
write: function write(e, r, t, n, o, i) {
|
|
1402
|
+
if (n < 0 || o < 0) throw new Ie.ErrnoError(28);
|
|
1403
|
+
if (Ie.isClosed(e)) throw new Ie.ErrnoError(8);
|
|
1404
|
+
if (0 == (2097155 & e.flags)) throw new Ie.ErrnoError(8);
|
|
1405
|
+
if (Ie.isDir(e.node.mode)) throw new Ie.ErrnoError(31);
|
|
1406
|
+
if (!e.stream_ops.write) throw new Ie.ErrnoError(28);
|
|
1407
|
+
e.seekable && 1024 & e.flags && Ie.llseek(e, 0, 2);
|
|
1408
|
+
var a = void 0 !== o;
|
|
1409
|
+
if (a) {
|
|
1410
|
+
if (!e.seekable) throw new Ie.ErrnoError(70);
|
|
1411
|
+
} else o = e.position;
|
|
1412
|
+
var s = e.stream_ops.write(e, r, t, n, o, i);
|
|
1413
|
+
return a || (e.position += s), s;
|
|
1414
|
+
},
|
|
1415
|
+
allocate: function allocate(e, r, t) {
|
|
1416
|
+
if (Ie.isClosed(e)) throw new Ie.ErrnoError(8);
|
|
1417
|
+
if (r < 0 || t <= 0) throw new Ie.ErrnoError(28);
|
|
1418
|
+
if (0 == (2097155 & e.flags)) throw new Ie.ErrnoError(8);
|
|
1419
|
+
if (!Ie.isFile(e.node.mode) && !Ie.isDir(e.node.mode)) throw new Ie.ErrnoError(43);
|
|
1420
|
+
if (!e.stream_ops.allocate) throw new Ie.ErrnoError(138);
|
|
1421
|
+
e.stream_ops.allocate(e, r, t);
|
|
1422
|
+
},
|
|
1423
|
+
mmap: function mmap(e, r, t, n, o, i) {
|
|
1424
|
+
if (0 != (2 & o) && 0 == (2 & i) && 2 != (2097155 & e.flags)) throw new Ie.ErrnoError(2);
|
|
1425
|
+
if (1 == (2097155 & e.flags)) throw new Ie.ErrnoError(2);
|
|
1426
|
+
if (!e.stream_ops.mmap) throw new Ie.ErrnoError(43);
|
|
1427
|
+
return e.stream_ops.mmap(e, r, t, n, o, i);
|
|
1428
|
+
},
|
|
1429
|
+
msync: function msync(e, r, t, n, o) {
|
|
1430
|
+
return e && e.stream_ops.msync ? e.stream_ops.msync(e, r, t, n, o) : 0;
|
|
1431
|
+
},
|
|
1432
|
+
munmap: function munmap(e) {
|
|
1433
|
+
return 0;
|
|
1434
|
+
},
|
|
1435
|
+
ioctl: function ioctl(e, r, t) {
|
|
1436
|
+
if (!e.stream_ops.ioctl) throw new Ie.ErrnoError(59);
|
|
1437
|
+
return e.stream_ops.ioctl(e, r, t);
|
|
1438
|
+
},
|
|
1439
|
+
readFile: function readFile(e) {
|
|
1440
|
+
var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
1441
|
+
if (r.flags = r.flags || 0, r.encoding = r.encoding || "binary", "utf8" !== r.encoding && "binary" !== r.encoding) throw new Error('Invalid encoding type "' + r.encoding + '"');
|
|
1442
|
+
var t,
|
|
1443
|
+
n = Ie.open(e, r.flags),
|
|
1444
|
+
o = Ie.stat(e),
|
|
1445
|
+
i = o.size,
|
|
1446
|
+
a = new Uint8Array(i);
|
|
1447
|
+
return Ie.read(n, a, 0, i, 0), "utf8" === r.encoding ? t = O(a, 0) : "binary" === r.encoding && (t = a), Ie.close(n), t;
|
|
1448
|
+
},
|
|
1449
|
+
writeFile: function writeFile(e, r) {
|
|
1450
|
+
var t = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
1451
|
+
t.flags = t.flags || 577;
|
|
1452
|
+
var n = Ie.open(e, t.flags, t.mode);
|
|
1453
|
+
if ("string" == typeof r) {
|
|
1454
|
+
var o = new Uint8Array(I(r) + 1),
|
|
1455
|
+
i = M(r, o, 0, o.length);
|
|
1456
|
+
Ie.write(n, o, 0, i, void 0, t.canOwn);
|
|
1457
|
+
} else {
|
|
1458
|
+
if (!ArrayBuffer.isView(r)) throw new Error("Unsupported data type");
|
|
1459
|
+
Ie.write(n, r, 0, r.byteLength, void 0, t.canOwn);
|
|
1460
|
+
}
|
|
1461
|
+
Ie.close(n);
|
|
1462
|
+
},
|
|
1463
|
+
cwd: function cwd() {
|
|
1464
|
+
return Ie.currentPath;
|
|
1465
|
+
},
|
|
1466
|
+
chdir: function chdir(e) {
|
|
1467
|
+
var r = Ie.lookupPath(e, {
|
|
1468
|
+
follow: !0
|
|
1469
|
+
});
|
|
1470
|
+
if (null === r.node) throw new Ie.ErrnoError(44);
|
|
1471
|
+
if (!Ie.isDir(r.node.mode)) throw new Ie.ErrnoError(54);
|
|
1472
|
+
var t = Ie.nodePermissions(r.node, "x");
|
|
1473
|
+
if (t) throw new Ie.ErrnoError(t);
|
|
1474
|
+
Ie.currentPath = r.path;
|
|
1475
|
+
},
|
|
1476
|
+
createDefaultDirectories: function createDefaultDirectories() {
|
|
1477
|
+
Ie.mkdir("/tmp"), Ie.mkdir("/home"), Ie.mkdir("/home/web_user");
|
|
1478
|
+
},
|
|
1479
|
+
createDefaultDevices: function createDefaultDevices() {
|
|
1480
|
+
Ie.mkdir("/dev"), Ie.registerDevice(Ie.makedev(1, 3), {
|
|
1481
|
+
read: function read() {
|
|
1482
|
+
return 0;
|
|
1483
|
+
},
|
|
1484
|
+
write: function write(e, r, t, n, o) {
|
|
1485
|
+
return n;
|
|
1486
|
+
}
|
|
1487
|
+
}), Ie.mkdev("/dev/null", Ie.makedev(1, 3)), De.register(Ie.makedev(5, 0), De.default_tty_ops), De.register(Ie.makedev(6, 0), De.default_tty1_ops), Ie.mkdev("/dev/tty", Ie.makedev(5, 0)), Ie.mkdev("/dev/tty1", Ie.makedev(6, 0));
|
|
1488
|
+
var e = function () {
|
|
1489
|
+
if ("object" == (typeof crypto === "undefined" ? "undefined" : _typeof(crypto)) && "function" == typeof crypto.getRandomValues) {
|
|
1490
|
+
var e = new Uint8Array(1);
|
|
1491
|
+
return function () {
|
|
1492
|
+
return crypto.getRandomValues(e), e[0];
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
if (u) try {
|
|
1496
|
+
var r = a.default;
|
|
1497
|
+
return function () {
|
|
1498
|
+
return r.randomBytes(1)[0];
|
|
1499
|
+
};
|
|
1500
|
+
} catch (e) {}
|
|
1501
|
+
return function () {
|
|
1502
|
+
ge("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
|
|
1503
|
+
};
|
|
1504
|
+
}();
|
|
1505
|
+
Ie.createDevice("/dev", "random", e), Ie.createDevice("/dev", "urandom", e), Ie.mkdir("/dev/shm"), Ie.mkdir("/dev/shm/tmp");
|
|
1506
|
+
},
|
|
1507
|
+
createSpecialDirectories: function createSpecialDirectories() {
|
|
1508
|
+
Ie.mkdir("/proc");
|
|
1509
|
+
var e = Ie.mkdir("/proc/self");
|
|
1510
|
+
Ie.mkdir("/proc/self/fd"), Ie.mount({
|
|
1511
|
+
mount: function mount() {
|
|
1512
|
+
var r = Ie.createNode(e, "fd", 16895, 73);
|
|
1513
|
+
return r.node_ops = {
|
|
1514
|
+
lookup: function lookup(e, r) {
|
|
1515
|
+
var t = +r,
|
|
1516
|
+
n = Ie.getStream(t);
|
|
1517
|
+
if (!n) throw new Ie.ErrnoError(8);
|
|
1518
|
+
var o = {
|
|
1519
|
+
parent: null,
|
|
1520
|
+
mount: {
|
|
1521
|
+
mountpoint: "fake"
|
|
1522
|
+
},
|
|
1523
|
+
node_ops: {
|
|
1524
|
+
readlink: function readlink() {
|
|
1525
|
+
return n.path;
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
};
|
|
1529
|
+
return o.parent = o, o;
|
|
1530
|
+
}
|
|
1531
|
+
}, r;
|
|
1532
|
+
}
|
|
1533
|
+
}, {}, "/proc/self/fd");
|
|
1534
|
+
},
|
|
1535
|
+
createStandardStreams: function createStandardStreams() {
|
|
1536
|
+
r.stdin ? Ie.createDevice("/dev", "stdin", r.stdin) : Ie.symlink("/dev/tty", "/dev/stdin"), r.stdout ? Ie.createDevice("/dev", "stdout", null, r.stdout) : Ie.symlink("/dev/tty", "/dev/stdout"), r.stderr ? Ie.createDevice("/dev", "stderr", null, r.stderr) : Ie.symlink("/dev/tty1", "/dev/stderr");
|
|
1537
|
+
var e = Ie.open("/dev/stdin", 0),
|
|
1538
|
+
t = Ie.open("/dev/stdout", 1),
|
|
1539
|
+
n = Ie.open("/dev/stderr", 1);
|
|
1540
|
+
F(0 === e.fd, "invalid handle for stdin (" + e.fd + ")"), F(1 === t.fd, "invalid handle for stdout (" + t.fd + ")"), F(2 === n.fd, "invalid handle for stderr (" + n.fd + ")");
|
|
1541
|
+
},
|
|
1542
|
+
ensureErrnoError: function ensureErrnoError() {
|
|
1543
|
+
Ie.ErrnoError || (Ie.ErrnoError = function (e, r) {
|
|
1544
|
+
this.node = r, this.setErrno = function (e) {
|
|
1545
|
+
for (var r in this.errno = e, Ne) if (Ne[r] === e) {
|
|
1546
|
+
this.code = r;
|
|
1547
|
+
break;
|
|
1548
|
+
}
|
|
1549
|
+
}, this.setErrno(e), this.message = Me[e], this.stack && (Object.defineProperty(this, "stack", {
|
|
1550
|
+
value: new Error().stack,
|
|
1551
|
+
writable: !0
|
|
1552
|
+
}), this.stack = Se(this.stack));
|
|
1553
|
+
}, Ie.ErrnoError.prototype = new Error(), Ie.ErrnoError.prototype.constructor = Ie.ErrnoError, [44].forEach(function (e) {
|
|
1554
|
+
Ie.genericErrors[e] = new Ie.ErrnoError(e), Ie.genericErrors[e].stack = "<generic error, no stack>";
|
|
1555
|
+
}));
|
|
1556
|
+
},
|
|
1557
|
+
staticInit: function staticInit() {
|
|
1558
|
+
Ie.ensureErrnoError(), Ie.nameTable = new Array(4096), Ie.mount(Re, {}, "/"), Ie.createDefaultDirectories(), Ie.createDefaultDevices(), Ie.createSpecialDirectories(), Ie.filesystems = {
|
|
1559
|
+
MEMFS: Re
|
|
1560
|
+
};
|
|
1561
|
+
},
|
|
1562
|
+
init: function init(e, t, n) {
|
|
1563
|
+
F(!Ie.init.initialized, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"), Ie.init.initialized = !0, Ie.ensureErrnoError(), r.stdin = e || r.stdin, r.stdout = t || r.stdout, r.stderr = n || r.stderr, Ie.createStandardStreams();
|
|
1564
|
+
},
|
|
1565
|
+
quit: function quit() {
|
|
1566
|
+
Ie.init.initialized = !1, wt();
|
|
1567
|
+
for (var e = 0; e < Ie.streams.length; e++) {
|
|
1568
|
+
var r = Ie.streams[e];
|
|
1569
|
+
r && Ie.close(r);
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
getMode: function getMode(e, r) {
|
|
1573
|
+
var t = 0;
|
|
1574
|
+
return e && (t |= 365), r && (t |= 146), t;
|
|
1575
|
+
},
|
|
1576
|
+
findObject: function findObject(e, r) {
|
|
1577
|
+
var t = Ie.analyzePath(e, r);
|
|
1578
|
+
return t.exists ? t.object : null;
|
|
1579
|
+
},
|
|
1580
|
+
analyzePath: function analyzePath(e, r) {
|
|
1581
|
+
try {
|
|
1582
|
+
e = (n = Ie.lookupPath(e, {
|
|
1583
|
+
follow: !r
|
|
1584
|
+
})).path;
|
|
1585
|
+
} catch (e) {}
|
|
1586
|
+
var t = {
|
|
1587
|
+
isRoot: !1,
|
|
1588
|
+
exists: !1,
|
|
1589
|
+
error: 0,
|
|
1590
|
+
name: null,
|
|
1591
|
+
path: null,
|
|
1592
|
+
object: null,
|
|
1593
|
+
parentExists: !1,
|
|
1594
|
+
parentPath: null,
|
|
1595
|
+
parentObject: null
|
|
1596
|
+
};
|
|
1597
|
+
try {
|
|
1598
|
+
var n = Ie.lookupPath(e, {
|
|
1599
|
+
parent: !0
|
|
1600
|
+
});
|
|
1601
|
+
t.parentExists = !0, t.parentPath = n.path, t.parentObject = n.node, t.name = Ae.basename(e), n = Ie.lookupPath(e, {
|
|
1602
|
+
follow: !r
|
|
1603
|
+
}), t.exists = !0, t.path = n.path, t.object = n.node, t.name = n.node.name, t.isRoot = "/" === n.path;
|
|
1604
|
+
} catch (e) {
|
|
1605
|
+
t.error = e.errno;
|
|
1606
|
+
}
|
|
1607
|
+
return t;
|
|
1608
|
+
},
|
|
1609
|
+
createPath: function createPath(e, r, t, n) {
|
|
1610
|
+
e = "string" == typeof e ? e : Ie.getPath(e);
|
|
1611
|
+
for (var o = r.split("/").reverse(); o.length;) {
|
|
1612
|
+
var i = o.pop();
|
|
1613
|
+
if (i) {
|
|
1614
|
+
var a = Ae.join2(e, i);
|
|
1615
|
+
try {
|
|
1616
|
+
Ie.mkdir(a);
|
|
1617
|
+
} catch (e) {}
|
|
1618
|
+
e = a;
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
return a;
|
|
1622
|
+
},
|
|
1623
|
+
createFile: function createFile(e, r, t, n, o) {
|
|
1624
|
+
var i = Ae.join2("string" == typeof e ? e : Ie.getPath(e), r),
|
|
1625
|
+
a = Ie.getMode(n, o);
|
|
1626
|
+
return Ie.create(i, a);
|
|
1627
|
+
},
|
|
1628
|
+
createDataFile: function createDataFile(e, r, t, n, o, i) {
|
|
1629
|
+
var a = r;
|
|
1630
|
+
e && (e = "string" == typeof e ? e : Ie.getPath(e), a = r ? Ae.join2(e, r) : e);
|
|
1631
|
+
var s = Ie.getMode(n, o),
|
|
1632
|
+
l = Ie.create(a, s);
|
|
1633
|
+
if (t) {
|
|
1634
|
+
if ("string" == typeof t) {
|
|
1635
|
+
for (var u = new Array(t.length), c = 0, d = t.length; c < d; ++c) u[c] = t.charCodeAt(c);
|
|
1636
|
+
t = u;
|
|
1637
|
+
}
|
|
1638
|
+
Ie.chmod(l, 146 | s);
|
|
1639
|
+
var f = Ie.open(l, 577);
|
|
1640
|
+
Ie.write(f, t, 0, t.length, 0, i), Ie.close(f), Ie.chmod(l, s);
|
|
1641
|
+
}
|
|
1642
|
+
return l;
|
|
1643
|
+
},
|
|
1644
|
+
createDevice: function createDevice(e, r, t, n) {
|
|
1645
|
+
var o = Ae.join2("string" == typeof e ? e : Ie.getPath(e), r),
|
|
1646
|
+
i = Ie.getMode(!!t, !!n);
|
|
1647
|
+
Ie.createDevice.major || (Ie.createDevice.major = 64);
|
|
1648
|
+
var a = Ie.makedev(Ie.createDevice.major++, 0);
|
|
1649
|
+
return Ie.registerDevice(a, {
|
|
1650
|
+
open: function open(e) {
|
|
1651
|
+
e.seekable = !1;
|
|
1652
|
+
},
|
|
1653
|
+
close: function close(e) {
|
|
1654
|
+
n && n.buffer && n.buffer.length && n(10);
|
|
1655
|
+
},
|
|
1656
|
+
read: function read(e, r, n, o, i) {
|
|
1657
|
+
for (var a = 0, s = 0; s < o; s++) {
|
|
1658
|
+
var l;
|
|
1659
|
+
try {
|
|
1660
|
+
l = t();
|
|
1661
|
+
} catch (e) {
|
|
1662
|
+
throw new Ie.ErrnoError(29);
|
|
1663
|
+
}
|
|
1664
|
+
if (void 0 === l && 0 === a) throw new Ie.ErrnoError(6);
|
|
1665
|
+
if (null == l) break;
|
|
1666
|
+
a++, r[n + s] = l;
|
|
1667
|
+
}
|
|
1668
|
+
return a && (e.node.timestamp = Date.now()), a;
|
|
1669
|
+
},
|
|
1670
|
+
write: function write(e, r, t, o, i) {
|
|
1671
|
+
for (var a = 0; a < o; a++) try {
|
|
1672
|
+
n(r[t + a]);
|
|
1673
|
+
} catch (e) {
|
|
1674
|
+
throw new Ie.ErrnoError(29);
|
|
1675
|
+
}
|
|
1676
|
+
return o && (e.node.timestamp = Date.now()), a;
|
|
1677
|
+
}
|
|
1678
|
+
}), Ie.mkdev(o, i, a);
|
|
1679
|
+
},
|
|
1680
|
+
forceLoadFile: function forceLoadFile(e) {
|
|
1681
|
+
if (e.isDevice || e.isFolder || e.link || e.contents) return !0;
|
|
1682
|
+
if ("undefined" != typeof XMLHttpRequest) throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
|
|
1683
|
+
if (!d) throw new Error("Cannot load without read() or XMLHttpRequest.");
|
|
1684
|
+
try {
|
|
1685
|
+
e.contents = pt(d(e.url), !0), e.usedBytes = e.contents.length;
|
|
1686
|
+
} catch (e) {
|
|
1687
|
+
throw new Ie.ErrnoError(29);
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
createLazyFile: function createLazyFile(e, r, t, n, o) {
|
|
1691
|
+
function i() {
|
|
1692
|
+
this.lengthKnown = !1, this.chunks = [];
|
|
1693
|
+
}
|
|
1694
|
+
if (i.prototype.get = function (e) {
|
|
1695
|
+
if (!(e > this.length - 1 || e < 0)) {
|
|
1696
|
+
var r = e % this.chunkSize,
|
|
1697
|
+
t = e / this.chunkSize | 0;
|
|
1698
|
+
return this.getter(t)[r];
|
|
1699
|
+
}
|
|
1700
|
+
}, i.prototype.setDataGetter = function (e) {
|
|
1701
|
+
this.getter = e;
|
|
1702
|
+
}, i.prototype.cacheLength = function () {
|
|
1703
|
+
var e = new XMLHttpRequest();
|
|
1704
|
+
if (e.open("HEAD", t, !1), e.send(null), !(e.status >= 200 && e.status < 300 || 304 === e.status)) throw new Error("Couldn't load " + t + ". Status: " + e.status);
|
|
1705
|
+
var r,
|
|
1706
|
+
n = Number(e.getResponseHeader("Content-length")),
|
|
1707
|
+
o = (r = e.getResponseHeader("Accept-Ranges")) && "bytes" === r,
|
|
1708
|
+
i = (r = e.getResponseHeader("Content-Encoding")) && "gzip" === r,
|
|
1709
|
+
a = 1048576;
|
|
1710
|
+
o || (a = n);
|
|
1711
|
+
var s = this;
|
|
1712
|
+
s.setDataGetter(function (e) {
|
|
1713
|
+
var r = e * a,
|
|
1714
|
+
o = (e + 1) * a - 1;
|
|
1715
|
+
if (o = Math.min(o, n - 1), void 0 === s.chunks[e] && (s.chunks[e] = function (e, r) {
|
|
1716
|
+
if (e > r) throw new Error("invalid range (" + e + ", " + r + ") or no bytes requested!");
|
|
1717
|
+
if (r > n - 1) throw new Error("only " + n + " bytes available! programmer error!");
|
|
1718
|
+
var o = new XMLHttpRequest();
|
|
1719
|
+
if (o.open("GET", t, !1), n !== a && o.setRequestHeader("Range", "bytes=" + e + "-" + r), o.responseType = "arraybuffer", o.overrideMimeType && o.overrideMimeType("text/plain; charset=x-user-defined"), o.send(null), !(o.status >= 200 && o.status < 300 || 304 === o.status)) throw new Error("Couldn't load " + t + ". Status: " + o.status);
|
|
1720
|
+
return void 0 !== o.response ? new Uint8Array(o.response || []) : pt(o.responseText || "", !0);
|
|
1721
|
+
}(r, o)), void 0 === s.chunks[e]) throw new Error("doXHR failed!");
|
|
1722
|
+
return s.chunks[e];
|
|
1723
|
+
}), !i && n || (a = n = 1, n = this.getter(0).length, a = n, b("LazyFiles on gzip forces download of the whole file when length is accessed")), this._length = n, this._chunkSize = a, this.lengthKnown = !0;
|
|
1724
|
+
}, "undefined" != typeof XMLHttpRequest) {
|
|
1725
|
+
if (!l) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";
|
|
1726
|
+
var a = new i();
|
|
1727
|
+
Object.defineProperties(a, {
|
|
1728
|
+
length: {
|
|
1729
|
+
get: function get() {
|
|
1730
|
+
return this.lengthKnown || this.cacheLength(), this._length;
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
chunkSize: {
|
|
1734
|
+
get: function get() {
|
|
1735
|
+
return this.lengthKnown || this.cacheLength(), this._chunkSize;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
var s = {
|
|
1740
|
+
isDevice: !1,
|
|
1741
|
+
contents: a
|
|
1742
|
+
};
|
|
1743
|
+
} else s = {
|
|
1744
|
+
isDevice: !1,
|
|
1745
|
+
url: t
|
|
1746
|
+
};
|
|
1747
|
+
var u = Ie.createFile(e, r, s, n, o);
|
|
1748
|
+
s.contents ? u.contents = s.contents : s.url && (u.contents = null, u.url = s.url), Object.defineProperties(u, {
|
|
1749
|
+
usedBytes: {
|
|
1750
|
+
get: function get() {
|
|
1751
|
+
return this.contents.length;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1755
|
+
var c = {};
|
|
1756
|
+
return Object.keys(u.stream_ops).forEach(function (e) {
|
|
1757
|
+
var r = u.stream_ops[e];
|
|
1758
|
+
c[e] = function () {
|
|
1759
|
+
return Ie.forceLoadFile(u), r.apply(null, arguments);
|
|
1760
|
+
};
|
|
1761
|
+
}), c.read = function (e, r, t, n, o) {
|
|
1762
|
+
Ie.forceLoadFile(u);
|
|
1763
|
+
var i = e.node.contents;
|
|
1764
|
+
if (o >= i.length) return 0;
|
|
1765
|
+
var a = Math.min(i.length - o, n);
|
|
1766
|
+
if (F(a >= 0), i.slice) for (var s = 0; s < a; s++) r[t + s] = i[o + s];else for (s = 0; s < a; s++) r[t + s] = i.get(o + s);
|
|
1767
|
+
return a;
|
|
1768
|
+
}, u.stream_ops = c, u;
|
|
1769
|
+
},
|
|
1770
|
+
createPreloadedFile: function createPreloadedFile(e, r, t, n, o, i, a, s, l, u) {
|
|
1771
|
+
var c = r ? Fe.resolve(Ae.join2(e, r)) : e,
|
|
1772
|
+
d = pe("cp " + c);
|
|
1773
|
+
function p(t) {
|
|
1774
|
+
function f(t) {
|
|
1775
|
+
u && u(), s || Ie.createDataFile(e, r, t, n, o, l), i && i(), he(d);
|
|
1776
|
+
}
|
|
1777
|
+
Browser.handledByPreloadPlugin(t, c, f, function () {
|
|
1778
|
+
a && a(), he(d);
|
|
1779
|
+
}) || f(t);
|
|
1780
|
+
}
|
|
1781
|
+
me(d), "string" == typeof t ? function (e, r, t, n) {
|
|
1782
|
+
var o = n ? "" : pe("al " + e);
|
|
1783
|
+
f(e, function (t) {
|
|
1784
|
+
F(t, 'Loading data file "' + e + '" failed (no arrayBuffer).'), r(new Uint8Array(t)), o && he(o);
|
|
1785
|
+
}, function (r) {
|
|
1786
|
+
if (!t) throw 'Loading data file "' + e + '" failed.';
|
|
1787
|
+
t();
|
|
1788
|
+
}), o && me(o);
|
|
1789
|
+
}(t, function (e) {
|
|
1790
|
+
return p(e);
|
|
1791
|
+
}, a) : p(t);
|
|
1792
|
+
},
|
|
1793
|
+
indexedDB: function indexedDB() {
|
|
1794
|
+
return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
|
|
1795
|
+
},
|
|
1796
|
+
DB_NAME: function DB_NAME() {
|
|
1797
|
+
return "EM_FS_" + window.location.pathname;
|
|
1798
|
+
},
|
|
1799
|
+
DB_VERSION: 20,
|
|
1800
|
+
DB_STORE_NAME: "FILE_DATA",
|
|
1801
|
+
saveFilesToDB: function saveFilesToDB(e, r, t) {
|
|
1802
|
+
r = r || function () {}, t = t || function () {};
|
|
1803
|
+
var n = Ie.indexedDB();
|
|
1804
|
+
try {
|
|
1805
|
+
var o = n.open(Ie.DB_NAME(), Ie.DB_VERSION);
|
|
1806
|
+
} catch (e) {
|
|
1807
|
+
return t(e);
|
|
1808
|
+
}
|
|
1809
|
+
o.onupgradeneeded = function () {
|
|
1810
|
+
b("creating db"), o.result.createObjectStore(Ie.DB_STORE_NAME);
|
|
1811
|
+
}, o.onsuccess = function () {
|
|
1812
|
+
var n = o.result.transaction([Ie.DB_STORE_NAME], "readwrite"),
|
|
1813
|
+
i = n.objectStore(Ie.DB_STORE_NAME),
|
|
1814
|
+
a = 0,
|
|
1815
|
+
s = 0,
|
|
1816
|
+
l = e.length;
|
|
1817
|
+
function u() {
|
|
1818
|
+
0 == s ? r() : t();
|
|
1819
|
+
}
|
|
1820
|
+
e.forEach(function (e) {
|
|
1821
|
+
var r = i.put(Ie.analyzePath(e).object.contents, e);
|
|
1822
|
+
r.onsuccess = function () {
|
|
1823
|
+
++a + s == l && u();
|
|
1824
|
+
}, r.onerror = function () {
|
|
1825
|
+
s++, a + s == l && u();
|
|
1826
|
+
};
|
|
1827
|
+
}), n.onerror = t;
|
|
1828
|
+
}, o.onerror = t;
|
|
1829
|
+
},
|
|
1830
|
+
loadFilesFromDB: function loadFilesFromDB(e, r, t) {
|
|
1831
|
+
r = r || function () {}, t = t || function () {};
|
|
1832
|
+
var n = Ie.indexedDB();
|
|
1833
|
+
try {
|
|
1834
|
+
var o = n.open(Ie.DB_NAME(), Ie.DB_VERSION);
|
|
1835
|
+
} catch (e) {
|
|
1836
|
+
return t(e);
|
|
1837
|
+
}
|
|
1838
|
+
o.onupgradeneeded = t, o.onsuccess = function () {
|
|
1839
|
+
var n = o.result;
|
|
1840
|
+
try {
|
|
1841
|
+
var i = n.transaction([Ie.DB_STORE_NAME], "readonly");
|
|
1842
|
+
} catch (e) {
|
|
1843
|
+
return void t(e);
|
|
1844
|
+
}
|
|
1845
|
+
var a = i.objectStore(Ie.DB_STORE_NAME),
|
|
1846
|
+
s = 0,
|
|
1847
|
+
l = 0,
|
|
1848
|
+
u = e.length;
|
|
1849
|
+
function c() {
|
|
1850
|
+
0 == l ? r() : t();
|
|
1851
|
+
}
|
|
1852
|
+
e.forEach(function (e) {
|
|
1853
|
+
var r = a.get(e);
|
|
1854
|
+
r.onsuccess = function () {
|
|
1855
|
+
Ie.analyzePath(e).exists && Ie.unlink(e), Ie.createDataFile(Ae.dirname(e), Ae.basename(e), r.result, !0, !0, !0), ++s + l == u && c();
|
|
1856
|
+
}, r.onerror = function () {
|
|
1857
|
+
l++, s + l == u && c();
|
|
1858
|
+
};
|
|
1859
|
+
}), i.onerror = t;
|
|
1860
|
+
}, o.onerror = t;
|
|
1861
|
+
},
|
|
1862
|
+
absolutePath: function absolutePath() {
|
|
1863
|
+
ge("FS.absolutePath has been removed; use PATH_FS.resolve instead");
|
|
1864
|
+
},
|
|
1865
|
+
createFolder: function createFolder() {
|
|
1866
|
+
ge("FS.createFolder has been removed; use FS.mkdir instead");
|
|
1867
|
+
},
|
|
1868
|
+
createLink: function createLink() {
|
|
1869
|
+
ge("FS.createLink has been removed; use FS.symlink instead");
|
|
1870
|
+
},
|
|
1871
|
+
joinPath: function joinPath() {
|
|
1872
|
+
ge("FS.joinPath has been removed; use PATH.join instead");
|
|
1873
|
+
},
|
|
1874
|
+
mmapAlloc: function mmapAlloc() {
|
|
1875
|
+
ge("FS.mmapAlloc has been replaced by the top level function mmapAlloc");
|
|
1876
|
+
},
|
|
1877
|
+
standardizePath: function standardizePath() {
|
|
1878
|
+
ge("FS.standardizePath has been removed; use PATH.normalize instead");
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
Le = {
|
|
1882
|
+
DEFAULT_POLLMASK: 5,
|
|
1883
|
+
calculateAt: function calculateAt(e, r, t) {
|
|
1884
|
+
if (Ae.isAbs(r)) return r;
|
|
1885
|
+
var n;
|
|
1886
|
+
if (-100 === e) n = Ie.cwd();else {
|
|
1887
|
+
var o = Ie.getStream(e);
|
|
1888
|
+
if (!o) throw new Ie.ErrnoError(8);
|
|
1889
|
+
n = o.path;
|
|
1890
|
+
}
|
|
1891
|
+
if (0 == r.length) {
|
|
1892
|
+
if (!t) throw new Ie.ErrnoError(44);
|
|
1893
|
+
return n;
|
|
1894
|
+
}
|
|
1895
|
+
return Ae.join2(n, r);
|
|
1896
|
+
},
|
|
1897
|
+
doStat: function doStat(e, r, t) {
|
|
1898
|
+
try {
|
|
1899
|
+
var n = e(r);
|
|
1900
|
+
} catch (e) {
|
|
1901
|
+
if (e && e.node && Ae.normalize(r) !== Ae.normalize(Ie.getPath(e.node))) return -54;
|
|
1902
|
+
throw e;
|
|
1903
|
+
}
|
|
1904
|
+
return $[t >> 2] = n.dev, $[t + 4 >> 2] = 0, $[t + 8 >> 2] = n.ino, $[t + 12 >> 2] = n.mode, $[t + 16 >> 2] = n.nlink, $[t + 20 >> 2] = n.uid, $[t + 24 >> 2] = n.gid, $[t + 28 >> 2] = n.rdev, $[t + 32 >> 2] = 0, Ee = [n.size >>> 0, (ye = n.size, +Math.abs(ye) >= 1 ? ye > 0 ? (0 | Math.min(+Math.floor(ye / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ye - +(~~ye >>> 0)) / 4294967296) >>> 0 : 0)], $[t + 40 >> 2] = Ee[0], $[t + 44 >> 2] = Ee[1], $[t + 48 >> 2] = 4096, $[t + 52 >> 2] = n.blocks, $[t + 56 >> 2] = n.atime.getTime() / 1e3 | 0, $[t + 60 >> 2] = 0, $[t + 64 >> 2] = n.mtime.getTime() / 1e3 | 0, $[t + 68 >> 2] = 0, $[t + 72 >> 2] = n.ctime.getTime() / 1e3 | 0, $[t + 76 >> 2] = 0, Ee = [n.ino >>> 0, (ye = n.ino, +Math.abs(ye) >= 1 ? ye > 0 ? (0 | Math.min(+Math.floor(ye / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ye - +(~~ye >>> 0)) / 4294967296) >>> 0 : 0)], $[t + 80 >> 2] = Ee[0], $[t + 84 >> 2] = Ee[1], 0;
|
|
1905
|
+
},
|
|
1906
|
+
doMsync: function doMsync(e, r, t, n, o) {
|
|
1907
|
+
var i = U.slice(e, e + t);
|
|
1908
|
+
Ie.msync(r, i, o, t, n);
|
|
1909
|
+
},
|
|
1910
|
+
doMknod: function doMknod(e, r, t) {
|
|
1911
|
+
switch (61440 & r) {
|
|
1912
|
+
case 32768:
|
|
1913
|
+
case 8192:
|
|
1914
|
+
case 24576:
|
|
1915
|
+
case 4096:
|
|
1916
|
+
case 49152:
|
|
1917
|
+
break;
|
|
1918
|
+
default:
|
|
1919
|
+
return -28;
|
|
1920
|
+
}
|
|
1921
|
+
return Ie.mknod(e, r, t), 0;
|
|
1922
|
+
},
|
|
1923
|
+
doReadlink: function doReadlink(e, r, t) {
|
|
1924
|
+
if (t <= 0) return -28;
|
|
1925
|
+
var n = Ie.readlink(e),
|
|
1926
|
+
o = Math.min(t, I(n)),
|
|
1927
|
+
i = x[r + o];
|
|
1928
|
+
return N(n, r, t + 1), x[r + o] = i, o;
|
|
1929
|
+
},
|
|
1930
|
+
doAccess: function doAccess(e, r) {
|
|
1931
|
+
if (-8 & r) return -28;
|
|
1932
|
+
var t = Ie.lookupPath(e, {
|
|
1933
|
+
follow: !0
|
|
1934
|
+
}).node;
|
|
1935
|
+
if (!t) return -44;
|
|
1936
|
+
var n = "";
|
|
1937
|
+
return 4 & r && (n += "r"), 2 & r && (n += "w"), 1 & r && (n += "x"), n && Ie.nodePermissions(t, n) ? -2 : 0;
|
|
1938
|
+
},
|
|
1939
|
+
doReadv: function doReadv(e, r, t, n) {
|
|
1940
|
+
for (var o = 0, i = 0; i < t; i++) {
|
|
1941
|
+
var a = $[r >> 2],
|
|
1942
|
+
s = $[r + 4 >> 2];
|
|
1943
|
+
r += 8;
|
|
1944
|
+
var l = Ie.read(e, x, a, s, n);
|
|
1945
|
+
if (l < 0) return -1;
|
|
1946
|
+
if (o += l, l < s) break;
|
|
1947
|
+
}
|
|
1948
|
+
return o;
|
|
1949
|
+
},
|
|
1950
|
+
doWritev: function doWritev(e, r, t, n) {
|
|
1951
|
+
for (var o = 0, i = 0; i < t; i++) {
|
|
1952
|
+
var a = $[r >> 2],
|
|
1953
|
+
s = $[r + 4 >> 2];
|
|
1954
|
+
r += 8;
|
|
1955
|
+
var l = Ie.write(e, x, a, s, n);
|
|
1956
|
+
if (l < 0) return -1;
|
|
1957
|
+
o += l;
|
|
1958
|
+
}
|
|
1959
|
+
return o;
|
|
1960
|
+
},
|
|
1961
|
+
varargs: void 0,
|
|
1962
|
+
get: function get() {
|
|
1963
|
+
return F(null != Le.varargs), Le.varargs += 4, $[Le.varargs - 4 >> 2];
|
|
1964
|
+
},
|
|
1965
|
+
getStr: function getStr(e) {
|
|
1966
|
+
return R(e);
|
|
1967
|
+
},
|
|
1968
|
+
getStreamFromFD: function getStreamFromFD(e) {
|
|
1969
|
+
var r = Ie.getStream(e);
|
|
1970
|
+
if (!r) throw new Ie.ErrnoError(8);
|
|
1971
|
+
return r;
|
|
1972
|
+
}
|
|
1973
|
+
};
|
|
1974
|
+
function xe(e) {
|
|
1975
|
+
switch (e) {
|
|
1976
|
+
case 1:
|
|
1977
|
+
return 0;
|
|
1978
|
+
case 2:
|
|
1979
|
+
return 1;
|
|
1980
|
+
case 4:
|
|
1981
|
+
return 2;
|
|
1982
|
+
case 8:
|
|
1983
|
+
return 3;
|
|
1984
|
+
default:
|
|
1985
|
+
throw new TypeError("Unknown type size: " + e);
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
var Ue = void 0;
|
|
1989
|
+
function Be(e) {
|
|
1990
|
+
for (var r = "", t = e; U[t];) r += Ue[U[t++]];
|
|
1991
|
+
return r;
|
|
1992
|
+
}
|
|
1993
|
+
var je = {},
|
|
1994
|
+
$e = {},
|
|
1995
|
+
We = {};
|
|
1996
|
+
function ze(e) {
|
|
1997
|
+
if (void 0 === e) return "_unknown";
|
|
1998
|
+
var r = (e = e.replace(/[^a-zA-Z0-9_]/g, "$")).charCodeAt(0);
|
|
1999
|
+
return r >= 48 && r <= 57 ? "_" + e : e;
|
|
2000
|
+
}
|
|
2001
|
+
function He(e, r) {
|
|
2002
|
+
return e = ze(e), new Function("body", "return function " + e + '() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r);
|
|
2003
|
+
}
|
|
2004
|
+
function Ge(e, r) {
|
|
2005
|
+
var t = He(r, function (e) {
|
|
2006
|
+
this.name = r, this.message = e;
|
|
2007
|
+
var t = new Error(e).stack;
|
|
2008
|
+
void 0 !== t && (this.stack = this.toString() + "\n" + t.replace(/^Error(:[^\n]*)?\n/, ""));
|
|
2009
|
+
});
|
|
2010
|
+
return t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.prototype.toString = function () {
|
|
2011
|
+
return void 0 === this.message ? this.name : this.name + ": " + this.message;
|
|
2012
|
+
}, t;
|
|
2013
|
+
}
|
|
2014
|
+
var Ve = void 0;
|
|
2015
|
+
function Ye(e) {
|
|
2016
|
+
throw new Ve(e);
|
|
2017
|
+
}
|
|
2018
|
+
var qe = void 0;
|
|
2019
|
+
function Xe(e) {
|
|
2020
|
+
throw new qe(e);
|
|
2021
|
+
}
|
|
2022
|
+
function Ke(e, r, t) {
|
|
2023
|
+
function n(r) {
|
|
2024
|
+
var n = t(r);
|
|
2025
|
+
n.length !== e.length && Xe("Mismatched type converter count");
|
|
2026
|
+
for (var o = 0; o < e.length; ++o) Je(e[o], n[o]);
|
|
2027
|
+
}
|
|
2028
|
+
e.forEach(function (e) {
|
|
2029
|
+
We[e] = r;
|
|
2030
|
+
});
|
|
2031
|
+
var o = new Array(r.length),
|
|
2032
|
+
i = [],
|
|
2033
|
+
a = 0;
|
|
2034
|
+
r.forEach(function (e, r) {
|
|
2035
|
+
$e.hasOwnProperty(e) ? o[r] = $e[e] : (i.push(e), je.hasOwnProperty(e) || (je[e] = []), je[e].push(function () {
|
|
2036
|
+
o[r] = $e[e], ++a === i.length && n(o);
|
|
2037
|
+
}));
|
|
2038
|
+
}), 0 === i.length && n(o);
|
|
2039
|
+
}
|
|
2040
|
+
function Je(e, r) {
|
|
2041
|
+
var t = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
2042
|
+
if (!("argPackAdvance" in r)) throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
2043
|
+
var n = r.name;
|
|
2044
|
+
if (e || Ye('type "' + n + '" must have a positive integer typeid pointer'), $e.hasOwnProperty(e)) {
|
|
2045
|
+
if (t.ignoreDuplicateRegistrations) return;
|
|
2046
|
+
Ye("Cannot register type '" + n + "' twice");
|
|
2047
|
+
}
|
|
2048
|
+
if ($e[e] = r, delete We[e], je.hasOwnProperty(e)) {
|
|
2049
|
+
var o = je[e];
|
|
2050
|
+
delete je[e], o.forEach(function (e) {
|
|
2051
|
+
return e();
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
function Qe(e) {
|
|
2056
|
+
if (!(this instanceof wr)) return !1;
|
|
2057
|
+
if (!(e instanceof wr)) return !1;
|
|
2058
|
+
for (var r = this.$$.ptrType.registeredClass, t = this.$$.ptr, n = e.$$.ptrType.registeredClass, o = e.$$.ptr; r.baseClass;) t = r.upcast(t), r = r.baseClass;
|
|
2059
|
+
for (; n.baseClass;) o = n.upcast(o), n = n.baseClass;
|
|
2060
|
+
return r === n && t === o;
|
|
2061
|
+
}
|
|
2062
|
+
function Ze(e) {
|
|
2063
|
+
Ye(e.$$.ptrType.registeredClass.name + " instance already deleted");
|
|
2064
|
+
}
|
|
2065
|
+
var er = !1;
|
|
2066
|
+
function rr(e) {}
|
|
2067
|
+
function tr(e) {
|
|
2068
|
+
e.count.value -= 1, 0 === e.count.value && function (e) {
|
|
2069
|
+
e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
|
|
2070
|
+
}(e);
|
|
2071
|
+
}
|
|
2072
|
+
function nr(e, r, t) {
|
|
2073
|
+
if (r === t) return e;
|
|
2074
|
+
if (void 0 === t.baseClass) return null;
|
|
2075
|
+
var n = nr(e, r, t.baseClass);
|
|
2076
|
+
return null === n ? null : t.downcast(n);
|
|
2077
|
+
}
|
|
2078
|
+
var or = {};
|
|
2079
|
+
function ir() {
|
|
2080
|
+
return Object.keys(dr).length;
|
|
2081
|
+
}
|
|
2082
|
+
function ar() {
|
|
2083
|
+
var e = [];
|
|
2084
|
+
for (var r in dr) dr.hasOwnProperty(r) && e.push(dr[r]);
|
|
2085
|
+
return e;
|
|
2086
|
+
}
|
|
2087
|
+
var sr = [];
|
|
2088
|
+
function lr() {
|
|
2089
|
+
for (; sr.length;) {
|
|
2090
|
+
var e = sr.pop();
|
|
2091
|
+
e.$$.deleteScheduled = !1, e.delete();
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
var ur = void 0;
|
|
2095
|
+
function cr(e) {
|
|
2096
|
+
ur = e, sr.length && ur && ur(lr);
|
|
2097
|
+
}
|
|
2098
|
+
var dr = {};
|
|
2099
|
+
function fr(e, r) {
|
|
2100
|
+
return r = function (e, r) {
|
|
2101
|
+
for (void 0 === r && Ye("ptr should not be undefined"); e.baseClass;) r = e.upcast(r), e = e.baseClass;
|
|
2102
|
+
return r;
|
|
2103
|
+
}(e, r), dr[r];
|
|
2104
|
+
}
|
|
2105
|
+
function pr(e, r) {
|
|
2106
|
+
return r.ptrType && r.ptr || Xe("makeClassHandle requires ptr and ptrType"), !!r.smartPtrType !== !!r.smartPtr && Xe("Both smartPtrType and smartPtr must be specified"), r.count = {
|
|
2107
|
+
value: 1
|
|
2108
|
+
}, hr(Object.create(e, {
|
|
2109
|
+
$$: {
|
|
2110
|
+
value: r
|
|
2111
|
+
}
|
|
2112
|
+
}));
|
|
2113
|
+
}
|
|
2114
|
+
function mr(e) {
|
|
2115
|
+
var r = this.getPointee(e);
|
|
2116
|
+
if (!r) return this.destructor(e), null;
|
|
2117
|
+
var t = fr(this.registeredClass, r);
|
|
2118
|
+
if (void 0 !== t) {
|
|
2119
|
+
if (0 === t.$$.count.value) return t.$$.ptr = r, t.$$.smartPtr = e, t.clone();
|
|
2120
|
+
var n = t.clone();
|
|
2121
|
+
return this.destructor(e), n;
|
|
2122
|
+
}
|
|
2123
|
+
function o() {
|
|
2124
|
+
return this.isSmartPointer ? pr(this.registeredClass.instancePrototype, {
|
|
2125
|
+
ptrType: this.pointeeType,
|
|
2126
|
+
ptr: r,
|
|
2127
|
+
smartPtrType: this,
|
|
2128
|
+
smartPtr: e
|
|
2129
|
+
}) : pr(this.registeredClass.instancePrototype, {
|
|
2130
|
+
ptrType: this,
|
|
2131
|
+
ptr: e
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
var i,
|
|
2135
|
+
a = this.registeredClass.getActualType(r),
|
|
2136
|
+
s = or[a];
|
|
2137
|
+
if (!s) return o.call(this);
|
|
2138
|
+
i = this.isConst ? s.constPointerType : s.pointerType;
|
|
2139
|
+
var l = nr(r, this.registeredClass, i.registeredClass);
|
|
2140
|
+
return null === l ? o.call(this) : this.isSmartPointer ? pr(i.registeredClass.instancePrototype, {
|
|
2141
|
+
ptrType: i,
|
|
2142
|
+
ptr: l,
|
|
2143
|
+
smartPtrType: this,
|
|
2144
|
+
smartPtr: e
|
|
2145
|
+
}) : pr(i.registeredClass.instancePrototype, {
|
|
2146
|
+
ptrType: i,
|
|
2147
|
+
ptr: l
|
|
2148
|
+
});
|
|
2149
|
+
}
|
|
2150
|
+
function hr(e) {
|
|
2151
|
+
return "undefined" == typeof FinalizationRegistry ? (hr = function hr(e) {
|
|
2152
|
+
return e;
|
|
2153
|
+
}, e) : (er = new FinalizationRegistry(function (e) {
|
|
2154
|
+
console.warn(e.leakWarning.stack.replace(/^Error: /, "")), tr(e.$$);
|
|
2155
|
+
}), hr = function hr(e) {
|
|
2156
|
+
var r = e.$$;
|
|
2157
|
+
if (!!r.smartPtr) {
|
|
2158
|
+
var t = {
|
|
2159
|
+
$$: r
|
|
2160
|
+
},
|
|
2161
|
+
n = r.ptrType.registeredClass;
|
|
2162
|
+
t.leakWarning = new Error("Embind found a leaked C++ instance " + n.name + " <0x" + r.ptr.toString(16) + ">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"), "captureStackTrace" in Error && Error.captureStackTrace(t.leakWarning, mr), er.register(e, t, e);
|
|
2163
|
+
}
|
|
2164
|
+
return e;
|
|
2165
|
+
}, rr = function rr(e) {
|
|
2166
|
+
return er.unregister(e);
|
|
2167
|
+
}, hr(e));
|
|
2168
|
+
}
|
|
2169
|
+
function gr() {
|
|
2170
|
+
if (this.$$.ptr || Ze(this), this.$$.preservePointerOnDelete) return this.$$.count.value += 1, this;
|
|
2171
|
+
var e,
|
|
2172
|
+
r = hr(Object.create(Object.getPrototypeOf(this), {
|
|
2173
|
+
$$: {
|
|
2174
|
+
value: (e = this.$$, {
|
|
2175
|
+
count: e.count,
|
|
2176
|
+
deleteScheduled: e.deleteScheduled,
|
|
2177
|
+
preservePointerOnDelete: e.preservePointerOnDelete,
|
|
2178
|
+
ptr: e.ptr,
|
|
2179
|
+
ptrType: e.ptrType,
|
|
2180
|
+
smartPtr: e.smartPtr,
|
|
2181
|
+
smartPtrType: e.smartPtrType
|
|
2182
|
+
})
|
|
2183
|
+
}
|
|
2184
|
+
}));
|
|
2185
|
+
return r.$$.count.value += 1, r.$$.deleteScheduled = !1, r;
|
|
2186
|
+
}
|
|
2187
|
+
function vr() {
|
|
2188
|
+
this.$$.ptr || Ze(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && Ye("Object already scheduled for deletion"), rr(this), tr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
|
2189
|
+
}
|
|
2190
|
+
function yr() {
|
|
2191
|
+
return !this.$$.ptr;
|
|
2192
|
+
}
|
|
2193
|
+
function Er() {
|
|
2194
|
+
return this.$$.ptr || Ze(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && Ye("Object already scheduled for deletion"), sr.push(this), 1 === sr.length && ur && ur(lr), this.$$.deleteScheduled = !0, this;
|
|
2195
|
+
}
|
|
2196
|
+
function wr() {}
|
|
2197
|
+
function br(e, r, t) {
|
|
2198
|
+
if (void 0 === e[r].overloadTable) {
|
|
2199
|
+
var n = e[r];
|
|
2200
|
+
e[r] = function () {
|
|
2201
|
+
return e[r].overloadTable.hasOwnProperty(arguments.length) || Ye("Function '" + t + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + e[r].overloadTable + ")!"), e[r].overloadTable[arguments.length].apply(this, arguments);
|
|
2202
|
+
}, e[r].overloadTable = [], e[r].overloadTable[n.argCount] = n;
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
function _r(e, r, t, n, o, i, a, s) {
|
|
2206
|
+
this.name = e, this.constructor = r, this.instancePrototype = t, this.rawDestructor = n, this.baseClass = o, this.getActualType = i, this.upcast = a, this.downcast = s, this.pureVirtualFunctions = [];
|
|
2207
|
+
}
|
|
2208
|
+
function Tr(e, r, t) {
|
|
2209
|
+
for (; r !== t;) r.upcast || Ye("Expected null or instance of " + t.name + ", got an instance of " + r.name), e = r.upcast(e), r = r.baseClass;
|
|
2210
|
+
return e;
|
|
2211
|
+
}
|
|
2212
|
+
function kr(e, r) {
|
|
2213
|
+
if (null === r) return this.isReference && Ye("null is not a valid " + this.name), 0;
|
|
2214
|
+
r.$$ || Ye('Cannot pass "' + qr(r) + '" as a ' + this.name), r.$$.ptr || Ye("Cannot pass deleted object as a pointer of type " + this.name);
|
|
2215
|
+
var t = r.$$.ptrType.registeredClass;
|
|
2216
|
+
return Tr(r.$$.ptr, t, this.registeredClass);
|
|
2217
|
+
}
|
|
2218
|
+
function Sr(e, r) {
|
|
2219
|
+
var t;
|
|
2220
|
+
if (null === r) return this.isReference && Ye("null is not a valid " + this.name), this.isSmartPointer ? (t = this.rawConstructor(), null !== e && e.push(this.rawDestructor, t), t) : 0;
|
|
2221
|
+
r.$$ || Ye('Cannot pass "' + qr(r) + '" as a ' + this.name), r.$$.ptr || Ye("Cannot pass deleted object as a pointer of type " + this.name), !this.isConst && r.$$.ptrType.isConst && Ye("Cannot convert argument of type " + (r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name) + " to parameter type " + this.name);
|
|
2222
|
+
var n = r.$$.ptrType.registeredClass;
|
|
2223
|
+
if (t = Tr(r.$$.ptr, n, this.registeredClass), this.isSmartPointer) switch (void 0 === r.$$.smartPtr && Ye("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
|
2224
|
+
case 0:
|
|
2225
|
+
r.$$.smartPtrType === this ? t = r.$$.smartPtr : Ye("Cannot convert argument of type " + (r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name) + " to parameter type " + this.name);
|
|
2226
|
+
break;
|
|
2227
|
+
case 1:
|
|
2228
|
+
t = r.$$.smartPtr;
|
|
2229
|
+
break;
|
|
2230
|
+
case 2:
|
|
2231
|
+
if (r.$$.smartPtrType === this) t = r.$$.smartPtr;else {
|
|
2232
|
+
var o = r.clone();
|
|
2233
|
+
t = this.rawShare(t, Yr.toHandle(function () {
|
|
2234
|
+
o.delete();
|
|
2235
|
+
})), null !== e && e.push(this.rawDestructor, t);
|
|
2236
|
+
}
|
|
2237
|
+
break;
|
|
2238
|
+
default:
|
|
2239
|
+
Ye("Unsupporting sharing policy");
|
|
2240
|
+
}
|
|
2241
|
+
return t;
|
|
2242
|
+
}
|
|
2243
|
+
function Cr(e, r) {
|
|
2244
|
+
if (null === r) return this.isReference && Ye("null is not a valid " + this.name), 0;
|
|
2245
|
+
r.$$ || Ye('Cannot pass "' + qr(r) + '" as a ' + this.name), r.$$.ptr || Ye("Cannot pass deleted object as a pointer of type " + this.name), r.$$.ptrType.isConst && Ye("Cannot convert argument of type " + r.$$.ptrType.name + " to parameter type " + this.name);
|
|
2246
|
+
var t = r.$$.ptrType.registeredClass;
|
|
2247
|
+
return Tr(r.$$.ptr, t, this.registeredClass);
|
|
2248
|
+
}
|
|
2249
|
+
function Pr(e) {
|
|
2250
|
+
return this.fromWireType(W[e >> 2]);
|
|
2251
|
+
}
|
|
2252
|
+
function Ar(e) {
|
|
2253
|
+
return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
|
|
2254
|
+
}
|
|
2255
|
+
function Fr(e) {
|
|
2256
|
+
this.rawDestructor && this.rawDestructor(e);
|
|
2257
|
+
}
|
|
2258
|
+
function Dr(e) {
|
|
2259
|
+
null !== e && e.delete();
|
|
2260
|
+
}
|
|
2261
|
+
function Or(e, r, t, n, o, i, a, s, l, u, c) {
|
|
2262
|
+
this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = o, this.pointeeType = i, this.sharingPolicy = a, this.rawGetPointee = s, this.rawConstructor = l, this.rawShare = u, this.rawDestructor = c, o || void 0 !== r.baseClass ? this.toWireType = Sr : n ? (this.toWireType = kr, this.destructorFunction = null) : (this.toWireType = Cr, this.destructorFunction = null);
|
|
2263
|
+
}
|
|
2264
|
+
function Rr(e, t, n) {
|
|
2265
|
+
return e.includes("j") ? function (e, t, n) {
|
|
2266
|
+
F("dynCall_" + e in r, "bad function pointer type - no table for sig '" + e + "'"), n && n.length ? F(n.length === e.substring(1).replace(/j/g, "--").length) : F(1 == e.length);
|
|
2267
|
+
var o = r["dynCall_" + e];
|
|
2268
|
+
return n && n.length ? o.apply(null, [t].concat(n)) : o.call(null, t);
|
|
2269
|
+
}(e, t, n) : (F(Ce(t), "missing table entry in dynCall: " + t), Ce(t).apply(null, n));
|
|
2270
|
+
}
|
|
2271
|
+
function Mr(e, r) {
|
|
2272
|
+
var t = (e = Be(e)).includes("j") ? function (e, r) {
|
|
2273
|
+
F(e.includes("j"), "getDynCaller should only be called with i64 sigs");
|
|
2274
|
+
var t = [];
|
|
2275
|
+
return function () {
|
|
2276
|
+
return t.length = 0, Object.assign(t, arguments), Rr(e, r, t);
|
|
2277
|
+
};
|
|
2278
|
+
}(e, r) : Ce(r);
|
|
2279
|
+
return "function" != typeof t && Ye("unknown function pointer with signature " + e + ": " + r), t;
|
|
2280
|
+
}
|
|
2281
|
+
var Nr = void 0;
|
|
2282
|
+
function Ir(e) {
|
|
2283
|
+
var r = Et(e),
|
|
2284
|
+
t = Be(r);
|
|
2285
|
+
return ht(r), t;
|
|
2286
|
+
}
|
|
2287
|
+
function Lr(e, r) {
|
|
2288
|
+
var t = [],
|
|
2289
|
+
n = {};
|
|
2290
|
+
throw r.forEach(function e(r) {
|
|
2291
|
+
n[r] || $e[r] || (We[r] ? We[r].forEach(e) : (t.push(r), n[r] = !0));
|
|
2292
|
+
}), new Nr(e + ": " + t.map(Ir).join([", "]));
|
|
2293
|
+
}
|
|
2294
|
+
function xr(e, r) {
|
|
2295
|
+
for (var t = [], n = 0; n < e; n++) t.push($[(r >> 2) + n]);
|
|
2296
|
+
return t;
|
|
2297
|
+
}
|
|
2298
|
+
function Ur(e) {
|
|
2299
|
+
for (; e.length;) {
|
|
2300
|
+
var r = e.pop();
|
|
2301
|
+
e.pop()(r);
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
function Br(e, r) {
|
|
2305
|
+
if (!(e instanceof Function)) throw new TypeError("new_ called with constructor type " + _typeof(e) + " which is not a function");
|
|
2306
|
+
var t = He(e.name || "unknownFunctionName", function () {});
|
|
2307
|
+
t.prototype = e.prototype;
|
|
2308
|
+
var n = new t(),
|
|
2309
|
+
o = e.apply(n, r);
|
|
2310
|
+
return o instanceof Object ? o : n;
|
|
2311
|
+
}
|
|
2312
|
+
function jr(e, r, t, n, o) {
|
|
2313
|
+
var i = r.length;
|
|
2314
|
+
i < 2 && Ye("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
2315
|
+
for (var a = null !== r[1] && null !== t, s = !1, l = 1; l < r.length; ++l) if (null !== r[l] && void 0 === r[l].destructorFunction) {
|
|
2316
|
+
s = !0;
|
|
2317
|
+
break;
|
|
2318
|
+
}
|
|
2319
|
+
var u = "void" !== r[0].name,
|
|
2320
|
+
c = "",
|
|
2321
|
+
d = "";
|
|
2322
|
+
for (l = 0; l < i - 2; ++l) c += (0 !== l ? ", " : "") + "arg" + l, d += (0 !== l ? ", " : "") + "arg" + l + "Wired";
|
|
2323
|
+
var f = "return function " + ze(e) + "(" + c + ") {\nif (arguments.length !== " + (i - 2) + ") {\nthrowBindingError('function " + e + " called with ' + arguments.length + ' arguments, expected " + (i - 2) + " args!');\n}\n";
|
|
2324
|
+
s && (f += "var destructors = [];\n");
|
|
2325
|
+
var p = s ? "destructors" : "null",
|
|
2326
|
+
m = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"],
|
|
2327
|
+
h = [Ye, n, o, Ur, r[0], r[1]];
|
|
2328
|
+
a && (f += "var thisWired = classParam.toWireType(" + p + ", this);\n");
|
|
2329
|
+
for (l = 0; l < i - 2; ++l) f += "var arg" + l + "Wired = argType" + l + ".toWireType(" + p + ", arg" + l + "); // " + r[l + 2].name + "\n", m.push("argType" + l), h.push(r[l + 2]);
|
|
2330
|
+
if (a && (d = "thisWired" + (d.length > 0 ? ", " : "") + d), f += (u ? "var rv = " : "") + "invoker(fn" + (d.length > 0 ? ", " : "") + d + ");\n", s) f += "runDestructors(destructors);\n";else for (l = a ? 1 : 2; l < r.length; ++l) {
|
|
2331
|
+
var g = 1 === l ? "thisWired" : "arg" + (l - 2) + "Wired";
|
|
2332
|
+
null !== r[l].destructorFunction && (f += g + "_dtor(" + g + "); // " + r[l].name + "\n", m.push(g + "_dtor"), h.push(r[l].destructorFunction));
|
|
2333
|
+
}
|
|
2334
|
+
return u && (f += "var ret = retType.fromWireType(rv);\nreturn ret;\n"), f += "}\n", m.push(f), Br(Function, m).apply(null, h);
|
|
2335
|
+
}
|
|
2336
|
+
function $r(e, r, t) {
|
|
2337
|
+
return e instanceof Object || Ye(t + ' with invalid "this": ' + e), e instanceof r.registeredClass.constructor || Ye(t + ' incompatible with "this" of type ' + e.constructor.name), e.$$.ptr || Ye("cannot call emscripten binding method " + t + " on deleted object"), Tr(e.$$.ptr, e.$$.ptrType.registeredClass, r.registeredClass);
|
|
2338
|
+
}
|
|
2339
|
+
var Wr = [],
|
|
2340
|
+
zr = [{}, {
|
|
2341
|
+
value: void 0
|
|
2342
|
+
}, {
|
|
2343
|
+
value: null
|
|
2344
|
+
}, {
|
|
2345
|
+
value: !0
|
|
2346
|
+
}, {
|
|
2347
|
+
value: !1
|
|
2348
|
+
}];
|
|
2349
|
+
function Hr(e) {
|
|
2350
|
+
e > 4 && 0 == --zr[e].refcount && (zr[e] = void 0, Wr.push(e));
|
|
2351
|
+
}
|
|
2352
|
+
function Gr() {
|
|
2353
|
+
for (var e = 0, r = 5; r < zr.length; ++r) void 0 !== zr[r] && ++e;
|
|
2354
|
+
return e;
|
|
2355
|
+
}
|
|
2356
|
+
function Vr() {
|
|
2357
|
+
for (var e = 5; e < zr.length; ++e) if (void 0 !== zr[e]) return zr[e];
|
|
2358
|
+
return null;
|
|
2359
|
+
}
|
|
2360
|
+
var Yr = {
|
|
2361
|
+
toValue: function toValue(e) {
|
|
2362
|
+
return e || Ye("Cannot use deleted val. handle = " + e), zr[e].value;
|
|
2363
|
+
},
|
|
2364
|
+
toHandle: function toHandle(e) {
|
|
2365
|
+
switch (e) {
|
|
2366
|
+
case void 0:
|
|
2367
|
+
return 1;
|
|
2368
|
+
case null:
|
|
2369
|
+
return 2;
|
|
2370
|
+
case !0:
|
|
2371
|
+
return 3;
|
|
2372
|
+
case !1:
|
|
2373
|
+
return 4;
|
|
2374
|
+
default:
|
|
2375
|
+
var r = Wr.length ? Wr.pop() : zr.length;
|
|
2376
|
+
return zr[r] = {
|
|
2377
|
+
refcount: 1,
|
|
2378
|
+
value: e
|
|
2379
|
+
}, r;
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
};
|
|
2383
|
+
function qr(e) {
|
|
2384
|
+
if (null === e) return "null";
|
|
2385
|
+
var r = _typeof(e);
|
|
2386
|
+
return "object" === r || "array" === r || "function" === r ? e.toString() : "" + e;
|
|
2387
|
+
}
|
|
2388
|
+
function Xr(e, r) {
|
|
2389
|
+
switch (r) {
|
|
2390
|
+
case 2:
|
|
2391
|
+
return function (e) {
|
|
2392
|
+
return this.fromWireType(z[e >> 2]);
|
|
2393
|
+
};
|
|
2394
|
+
case 3:
|
|
2395
|
+
return function (e) {
|
|
2396
|
+
return this.fromWireType(H[e >> 3]);
|
|
2397
|
+
};
|
|
2398
|
+
default:
|
|
2399
|
+
throw new TypeError("Unknown float type: " + e);
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
function Kr(e, r, t) {
|
|
2403
|
+
switch (r) {
|
|
2404
|
+
case 0:
|
|
2405
|
+
return t ? function (e) {
|
|
2406
|
+
return x[e];
|
|
2407
|
+
} : function (e) {
|
|
2408
|
+
return U[e];
|
|
2409
|
+
};
|
|
2410
|
+
case 1:
|
|
2411
|
+
return t ? function (e) {
|
|
2412
|
+
return B[e >> 1];
|
|
2413
|
+
} : function (e) {
|
|
2414
|
+
return j[e >> 1];
|
|
2415
|
+
};
|
|
2416
|
+
case 2:
|
|
2417
|
+
return t ? function (e) {
|
|
2418
|
+
return $[e >> 2];
|
|
2419
|
+
} : function (e) {
|
|
2420
|
+
return W[e >> 2];
|
|
2421
|
+
};
|
|
2422
|
+
default:
|
|
2423
|
+
throw new TypeError("Unknown integer type: " + e);
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
function Jr(e, r) {
|
|
2427
|
+
var t = $e[e];
|
|
2428
|
+
return void 0 === t && Ye(r + " has unknown type " + Ir(e)), t;
|
|
2429
|
+
}
|
|
2430
|
+
var Qr = {};
|
|
2431
|
+
var Zr = [];
|
|
2432
|
+
var et = [];
|
|
2433
|
+
function rt(e, r) {
|
|
2434
|
+
return F(r === (0 | r)), (e >>> 0) + 4294967296 * r;
|
|
2435
|
+
}
|
|
2436
|
+
function tt(e, r) {
|
|
2437
|
+
if (e <= 0) return e;
|
|
2438
|
+
var t = r <= 32 ? Math.abs(1 << r - 1) : Math.pow(2, r - 1);
|
|
2439
|
+
return e >= t && (r <= 32 || e > t) && (e = -2 * t + e), e;
|
|
2440
|
+
}
|
|
2441
|
+
function nt(e, r) {
|
|
2442
|
+
return e >= 0 ? e : r <= 32 ? 2 * Math.abs(1 << r - 1) + e : Math.pow(2, r) + e;
|
|
2443
|
+
}
|
|
2444
|
+
function ot(e, r) {
|
|
2445
|
+
F(0 == (3 & r));
|
|
2446
|
+
var t = e,
|
|
2447
|
+
n = r;
|
|
2448
|
+
function o(e) {
|
|
2449
|
+
var r;
|
|
2450
|
+
return n = function (e, r) {
|
|
2451
|
+
return "double" === r || "i64" === r ? 7 & e && (F(4 == (7 & e)), e += 4) : F(0 == (3 & e)), e;
|
|
2452
|
+
}(n, e), "double" === e ? (r = Number(H[n >> 3]), n += 8) : "i64" == e ? (r = [$[n >> 2], $[n + 4 >> 2]], n += 8) : (F(0 == (3 & n)), e = "i32", r = $[n >> 2], n += 4), r;
|
|
2453
|
+
}
|
|
2454
|
+
for (var i, a, s, l, u, c, d = [];;) {
|
|
2455
|
+
var f = t;
|
|
2456
|
+
if (0 === (i = x[t >> 0])) break;
|
|
2457
|
+
if (a = x[t + 1 >> 0], 37 == i) {
|
|
2458
|
+
var p = !1,
|
|
2459
|
+
m = !1,
|
|
2460
|
+
h = !1,
|
|
2461
|
+
g = !1,
|
|
2462
|
+
v = !1;
|
|
2463
|
+
e: for (;;) {
|
|
2464
|
+
switch (a) {
|
|
2465
|
+
case 43:
|
|
2466
|
+
p = !0;
|
|
2467
|
+
break;
|
|
2468
|
+
case 45:
|
|
2469
|
+
m = !0;
|
|
2470
|
+
break;
|
|
2471
|
+
case 35:
|
|
2472
|
+
h = !0;
|
|
2473
|
+
break;
|
|
2474
|
+
case 48:
|
|
2475
|
+
if (g) break e;
|
|
2476
|
+
g = !0;
|
|
2477
|
+
break;
|
|
2478
|
+
case 32:
|
|
2479
|
+
v = !0;
|
|
2480
|
+
break;
|
|
2481
|
+
default:
|
|
2482
|
+
break e;
|
|
2483
|
+
}
|
|
2484
|
+
t++, a = x[t + 1 >> 0];
|
|
2485
|
+
}
|
|
2486
|
+
var y = 0;
|
|
2487
|
+
if (42 == a) y = o("i32"), t++, a = x[t + 1 >> 0];else for (; a >= 48 && a <= 57;) y = 10 * y + (a - 48), t++, a = x[t + 1 >> 0];
|
|
2488
|
+
var E,
|
|
2489
|
+
w = !1,
|
|
2490
|
+
b = -1;
|
|
2491
|
+
if (46 == a) {
|
|
2492
|
+
if (b = 0, w = !0, t++, 42 == (a = x[t + 1 >> 0])) b = o("i32"), t++;else for (;;) {
|
|
2493
|
+
var _ = x[t + 1 >> 0];
|
|
2494
|
+
if (_ < 48 || _ > 57) break;
|
|
2495
|
+
b = 10 * b + (_ - 48), t++;
|
|
2496
|
+
}
|
|
2497
|
+
a = x[t + 1 >> 0];
|
|
2498
|
+
}
|
|
2499
|
+
switch (b < 0 && (b = 6, w = !1), String.fromCharCode(a)) {
|
|
2500
|
+
case "h":
|
|
2501
|
+
104 == x[t + 2 >> 0] ? (t++, E = 1) : E = 2;
|
|
2502
|
+
break;
|
|
2503
|
+
case "l":
|
|
2504
|
+
108 == x[t + 2 >> 0] ? (t++, E = 8) : E = 4;
|
|
2505
|
+
break;
|
|
2506
|
+
case "L":
|
|
2507
|
+
case "q":
|
|
2508
|
+
case "j":
|
|
2509
|
+
E = 8;
|
|
2510
|
+
break;
|
|
2511
|
+
case "z":
|
|
2512
|
+
case "t":
|
|
2513
|
+
case "I":
|
|
2514
|
+
E = 4;
|
|
2515
|
+
break;
|
|
2516
|
+
default:
|
|
2517
|
+
E = null;
|
|
2518
|
+
}
|
|
2519
|
+
switch (E && t++, a = x[t + 1 >> 0], String.fromCharCode(a)) {
|
|
2520
|
+
case "d":
|
|
2521
|
+
case "i":
|
|
2522
|
+
case "u":
|
|
2523
|
+
case "o":
|
|
2524
|
+
case "x":
|
|
2525
|
+
case "X":
|
|
2526
|
+
case "p":
|
|
2527
|
+
var T = 100 == a || 105 == a;
|
|
2528
|
+
if (s = o("i" + 8 * (E = E || 4)), 8 == E && (s = 117 == a ? (u = s[0], c = s[1], (u >>> 0) + 4294967296 * (c >>> 0)) : rt(s[0], s[1])), E <= 4) s = (T ? tt : nt)(s & Math.pow(256, E) - 1, 8 * E);
|
|
2529
|
+
var k = Math.abs(s),
|
|
2530
|
+
S = "";
|
|
2531
|
+
if (100 == a || 105 == a) A = tt(s, 8 * E).toString(10);else if (117 == a) A = nt(s, 8 * E).toString(10), s = Math.abs(s);else if (111 == a) A = (h ? "0" : "") + k.toString(8);else if (120 == a || 88 == a) {
|
|
2532
|
+
if (S = h && 0 != s ? "0x" : "", s < 0) {
|
|
2533
|
+
s = -s, A = (k - 1).toString(16);
|
|
2534
|
+
for (var C = [], P = 0; P < A.length; P++) C.push((15 - parseInt(A[P], 16)).toString(16));
|
|
2535
|
+
for (A = C.join(""); A.length < 2 * E;) A = "f" + A;
|
|
2536
|
+
} else A = k.toString(16);
|
|
2537
|
+
88 == a && (S = S.toUpperCase(), A = A.toUpperCase());
|
|
2538
|
+
} else 112 == a && (0 === k ? A = "(nil)" : (S = "0x", A = k.toString(16)));
|
|
2539
|
+
if (w) for (; A.length < b;) A = "0" + A;
|
|
2540
|
+
for (s >= 0 && (p ? S = "+" + S : v && (S = " " + S)), "-" == A.charAt(0) && (S = "-" + S, A = A.substr(1)); S.length + A.length < y;) m ? A += " " : g ? A = "0" + A : S = " " + S;
|
|
2541
|
+
(A = S + A).split("").forEach(function (e) {
|
|
2542
|
+
d.push(e.charCodeAt(0));
|
|
2543
|
+
});
|
|
2544
|
+
break;
|
|
2545
|
+
case "f":
|
|
2546
|
+
case "F":
|
|
2547
|
+
case "e":
|
|
2548
|
+
case "E":
|
|
2549
|
+
case "g":
|
|
2550
|
+
case "G":
|
|
2551
|
+
var A;
|
|
2552
|
+
if (s = o("double"), isNaN(s)) A = "nan", g = !1;else if (isFinite(s)) {
|
|
2553
|
+
var D = !1,
|
|
2554
|
+
O = Math.min(b, 20);
|
|
2555
|
+
if (103 == a || 71 == a) {
|
|
2556
|
+
D = !0, b = b || 1;
|
|
2557
|
+
var R = parseInt(s.toExponential(O).split("e")[1], 10);
|
|
2558
|
+
b > R && R >= -4 ? (a = (103 == a ? "f" : "F").charCodeAt(0), b -= R + 1) : (a = (103 == a ? "e" : "E").charCodeAt(0), b--), O = Math.min(b, 20);
|
|
2559
|
+
}
|
|
2560
|
+
101 == a || 69 == a ? (A = s.toExponential(O), /[eE][-+]\d$/.test(A) && (A = A.slice(0, -1) + "0" + A.slice(-1))) : 102 != a && 70 != a || (A = s.toFixed(O), 0 === s && ((l = s) < 0 || 0 === l && 1 / l == -1 / 0) && (A = "-" + A));
|
|
2561
|
+
var M = A.split("e");
|
|
2562
|
+
if (D && !h) for (; M[0].length > 1 && M[0].includes(".") && ("0" == M[0].slice(-1) || "." == M[0].slice(-1));) M[0] = M[0].slice(0, -1);else for (h && -1 == A.indexOf(".") && (M[0] += "."); b > O++;) M[0] += "0";
|
|
2563
|
+
A = M[0] + (M.length > 1 ? "e" + M[1] : ""), 69 == a && (A = A.toUpperCase()), s >= 0 && (p ? A = "+" + A : v && (A = " " + A));
|
|
2564
|
+
} else A = (s < 0 ? "-" : "") + "inf", g = !1;
|
|
2565
|
+
for (; A.length < y;) m ? A += " " : A = !g || "-" != A[0] && "+" != A[0] ? (g ? "0" : " ") + A : A[0] + "0" + A.slice(1);
|
|
2566
|
+
a < 97 && (A = A.toUpperCase()), A.split("").forEach(function (e) {
|
|
2567
|
+
d.push(e.charCodeAt(0));
|
|
2568
|
+
});
|
|
2569
|
+
break;
|
|
2570
|
+
case "s":
|
|
2571
|
+
var N = o("i8*"),
|
|
2572
|
+
I = N ? vt(N) : "(null)".length;
|
|
2573
|
+
if (w && (I = Math.min(I, b)), !m) for (; I < y--;) d.push(32);
|
|
2574
|
+
if (N) for (P = 0; P < I; P++) d.push(U[N++ >> 0]);else d = d.concat(pt("(null)".substr(0, I), !0));
|
|
2575
|
+
if (m) for (; I < y--;) d.push(32);
|
|
2576
|
+
break;
|
|
2577
|
+
case "c":
|
|
2578
|
+
for (m && d.push(o("i8")); --y > 0;) d.push(32);
|
|
2579
|
+
m || d.push(o("i8"));
|
|
2580
|
+
break;
|
|
2581
|
+
case "n":
|
|
2582
|
+
var L = o("i32*");
|
|
2583
|
+
$[L >> 2] = d.length;
|
|
2584
|
+
break;
|
|
2585
|
+
case "%":
|
|
2586
|
+
d.push(i);
|
|
2587
|
+
break;
|
|
2588
|
+
default:
|
|
2589
|
+
for (P = f; P < t + 2; P++) d.push(x[P >> 0]);
|
|
2590
|
+
}
|
|
2591
|
+
t += 2;
|
|
2592
|
+
} else d.push(i), t += 1;
|
|
2593
|
+
}
|
|
2594
|
+
return d;
|
|
2595
|
+
}
|
|
2596
|
+
function it(e) {
|
|
2597
|
+
if (!e || !e.callee || !e.callee.name) return [null, "", ""];
|
|
2598
|
+
e.callee.toString();
|
|
2599
|
+
var r = e.callee.name,
|
|
2600
|
+
t = "(",
|
|
2601
|
+
n = !0;
|
|
2602
|
+
for (var o in e) {
|
|
2603
|
+
var i = e[o];
|
|
2604
|
+
n || (t += ", "), n = !1, t += "number" == typeof i || "string" == typeof i ? i : "(" + _typeof(i) + ")";
|
|
2605
|
+
}
|
|
2606
|
+
t += ")";
|
|
2607
|
+
var a = e.callee.caller;
|
|
2608
|
+
return n && (t = ""), [e = a ? a.arguments : [], r, t];
|
|
2609
|
+
}
|
|
2610
|
+
function at(e, r) {
|
|
2611
|
+
24 & e && (r = r.replace(/\s+$/, ""), r += (r.length > 0 ? "\n" : "") + function (e) {
|
|
2612
|
+
var r = Pe(),
|
|
2613
|
+
t = r.lastIndexOf("_emscripten_log"),
|
|
2614
|
+
n = r.lastIndexOf("_emscripten_get_callstack"),
|
|
2615
|
+
o = r.indexOf("\n", Math.max(t, n)) + 1;
|
|
2616
|
+
r = r.slice(o), 32 & e && T("EM_LOG_DEMANGLE is deprecated; ignoring"), 8 & e && "undefined" == typeof emscripten_source_map && (T('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), e ^= 8, e |= 16);
|
|
2617
|
+
var i = null;
|
|
2618
|
+
if (128 & e) for (i = it(arguments); i[1].includes("_emscripten_");) i = it(i[0]);
|
|
2619
|
+
var a = r.split("\n");
|
|
2620
|
+
r = "";
|
|
2621
|
+
var s = new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),
|
|
2622
|
+
l = new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),
|
|
2623
|
+
u = new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");
|
|
2624
|
+
for (var c in a) {
|
|
2625
|
+
var d = a[c],
|
|
2626
|
+
f = "",
|
|
2627
|
+
p = "",
|
|
2628
|
+
m = 0,
|
|
2629
|
+
h = 0,
|
|
2630
|
+
g = u.exec(d);
|
|
2631
|
+
if (g && 5 == g.length) f = g[1], p = g[2], m = g[3], h = g[4];else {
|
|
2632
|
+
if ((g = s.exec(d)) || (g = l.exec(d)), !(g && g.length >= 4)) {
|
|
2633
|
+
r += d + "\n";
|
|
2634
|
+
continue;
|
|
2635
|
+
}
|
|
2636
|
+
f = g[1], p = g[2], m = g[3], h = 0 | g[4];
|
|
2637
|
+
}
|
|
2638
|
+
var v = !1;
|
|
2639
|
+
if (8 & e) {
|
|
2640
|
+
var y = emscripten_source_map.originalPositionFor({
|
|
2641
|
+
line: m,
|
|
2642
|
+
column: h
|
|
2643
|
+
});
|
|
2644
|
+
(v = y && y.source) && (64 & e && (y.source = y.source.substring(y.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), r += " at " + f + " (" + y.source + ":" + y.line + ":" + y.column + ")\n");
|
|
2645
|
+
}
|
|
2646
|
+
(16 & e || !v) && (64 & e && (p = p.substring(p.replace(/\\/g, "/").lastIndexOf("/") + 1)), r += (v ? " = " + f : " at " + f) + " (" + p + ":" + m + ":" + h + ")\n"), 128 & e && i[0] && (i[1] == f && i[2].length > 0 && (r = r.replace(/\s+$/, ""), r += " with values: " + i[1] + i[2] + "\n"), i = it(i[0]));
|
|
2647
|
+
}
|
|
2648
|
+
return r.replace(/\s+$/, "");
|
|
2649
|
+
}(e)), 1 & e ? 4 & e ? console.error(r) : 2 & e ? console.warn(r) : 512 & e ? console.info(r) : 256 & e ? console.debug(r) : console.log(r) : 6 & e ? _(r) : b(r);
|
|
2650
|
+
}
|
|
2651
|
+
function st(e) {
|
|
2652
|
+
try {
|
|
2653
|
+
return w.grow(e - L.byteLength + 65535 >>> 16), Z(w.buffer), 1;
|
|
2654
|
+
} catch (r) {
|
|
2655
|
+
_("emscripten_realloc_buffer: Attempted to grow heap from " + L.byteLength + " bytes to " + e + " bytes, but got error: " + r);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
var lt = {};
|
|
2659
|
+
function ut() {
|
|
2660
|
+
if (!ut.strings) {
|
|
2661
|
+
var e = {
|
|
2662
|
+
USER: "web_user",
|
|
2663
|
+
LOGNAME: "web_user",
|
|
2664
|
+
PATH: "/",
|
|
2665
|
+
PWD: "/",
|
|
2666
|
+
HOME: "/home/web_user",
|
|
2667
|
+
LANG: ("object" == (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8",
|
|
2668
|
+
_: n || "./this.program"
|
|
2669
|
+
};
|
|
2670
|
+
for (var r in lt) void 0 === lt[r] ? delete e[r] : e[r] = lt[r];
|
|
2671
|
+
var t = [];
|
|
2672
|
+
for (var r in e) t.push(r + "=" + e[r]);
|
|
2673
|
+
ut.strings = t;
|
|
2674
|
+
}
|
|
2675
|
+
return ut.strings;
|
|
2676
|
+
}
|
|
2677
|
+
var ct = function ct(e, r, t, n) {
|
|
2678
|
+
e || (e = this), this.parent = e, this.mount = e.mount, this.mounted = null, this.id = Ie.nextInode++, this.name = r, this.mode = t, this.node_ops = {}, this.stream_ops = {}, this.rdev = n;
|
|
2679
|
+
},
|
|
2680
|
+
dt = 365,
|
|
2681
|
+
ft = 146;
|
|
2682
|
+
function pt(e, r, t) {
|
|
2683
|
+
var n = t > 0 ? t : I(e) + 1,
|
|
2684
|
+
o = new Array(n),
|
|
2685
|
+
i = M(e, o, 0, o.length);
|
|
2686
|
+
return r && (o.length = i), o;
|
|
2687
|
+
}
|
|
2688
|
+
Object.defineProperties(ct.prototype, {
|
|
2689
|
+
read: {
|
|
2690
|
+
get: function get() {
|
|
2691
|
+
return (this.mode & dt) === dt;
|
|
2692
|
+
},
|
|
2693
|
+
set: function set(e) {
|
|
2694
|
+
e ? this.mode |= dt : this.mode &= -366;
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
write: {
|
|
2698
|
+
get: function get() {
|
|
2699
|
+
return (this.mode & ft) === ft;
|
|
2700
|
+
},
|
|
2701
|
+
set: function set(e) {
|
|
2702
|
+
e ? this.mode |= ft : this.mode &= -147;
|
|
2703
|
+
}
|
|
2704
|
+
},
|
|
2705
|
+
isFolder: {
|
|
2706
|
+
get: function get() {
|
|
2707
|
+
return Ie.isDir(this.mode);
|
|
2708
|
+
}
|
|
2709
|
+
},
|
|
2710
|
+
isDevice: {
|
|
2711
|
+
get: function get() {
|
|
2712
|
+
return Ie.isChrdev(this.mode);
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
}), Ie.FSNode = ct, Ie.staticInit(), Ne = {
|
|
2716
|
+
EPERM: 63,
|
|
2717
|
+
ENOENT: 44,
|
|
2718
|
+
ESRCH: 71,
|
|
2719
|
+
EINTR: 27,
|
|
2720
|
+
EIO: 29,
|
|
2721
|
+
ENXIO: 60,
|
|
2722
|
+
E2BIG: 1,
|
|
2723
|
+
ENOEXEC: 45,
|
|
2724
|
+
EBADF: 8,
|
|
2725
|
+
ECHILD: 12,
|
|
2726
|
+
EAGAIN: 6,
|
|
2727
|
+
EWOULDBLOCK: 6,
|
|
2728
|
+
ENOMEM: 48,
|
|
2729
|
+
EACCES: 2,
|
|
2730
|
+
EFAULT: 21,
|
|
2731
|
+
ENOTBLK: 105,
|
|
2732
|
+
EBUSY: 10,
|
|
2733
|
+
EEXIST: 20,
|
|
2734
|
+
EXDEV: 75,
|
|
2735
|
+
ENODEV: 43,
|
|
2736
|
+
ENOTDIR: 54,
|
|
2737
|
+
EISDIR: 31,
|
|
2738
|
+
EINVAL: 28,
|
|
2739
|
+
ENFILE: 41,
|
|
2740
|
+
EMFILE: 33,
|
|
2741
|
+
ENOTTY: 59,
|
|
2742
|
+
ETXTBSY: 74,
|
|
2743
|
+
EFBIG: 22,
|
|
2744
|
+
ENOSPC: 51,
|
|
2745
|
+
ESPIPE: 70,
|
|
2746
|
+
EROFS: 69,
|
|
2747
|
+
EMLINK: 34,
|
|
2748
|
+
EPIPE: 64,
|
|
2749
|
+
EDOM: 18,
|
|
2750
|
+
ERANGE: 68,
|
|
2751
|
+
ENOMSG: 49,
|
|
2752
|
+
EIDRM: 24,
|
|
2753
|
+
ECHRNG: 106,
|
|
2754
|
+
EL2NSYNC: 156,
|
|
2755
|
+
EL3HLT: 107,
|
|
2756
|
+
EL3RST: 108,
|
|
2757
|
+
ELNRNG: 109,
|
|
2758
|
+
EUNATCH: 110,
|
|
2759
|
+
ENOCSI: 111,
|
|
2760
|
+
EL2HLT: 112,
|
|
2761
|
+
EDEADLK: 16,
|
|
2762
|
+
ENOLCK: 46,
|
|
2763
|
+
EBADE: 113,
|
|
2764
|
+
EBADR: 114,
|
|
2765
|
+
EXFULL: 115,
|
|
2766
|
+
ENOANO: 104,
|
|
2767
|
+
EBADRQC: 103,
|
|
2768
|
+
EBADSLT: 102,
|
|
2769
|
+
EDEADLOCK: 16,
|
|
2770
|
+
EBFONT: 101,
|
|
2771
|
+
ENOSTR: 100,
|
|
2772
|
+
ENODATA: 116,
|
|
2773
|
+
ETIME: 117,
|
|
2774
|
+
ENOSR: 118,
|
|
2775
|
+
ENONET: 119,
|
|
2776
|
+
ENOPKG: 120,
|
|
2777
|
+
EREMOTE: 121,
|
|
2778
|
+
ENOLINK: 47,
|
|
2779
|
+
EADV: 122,
|
|
2780
|
+
ESRMNT: 123,
|
|
2781
|
+
ECOMM: 124,
|
|
2782
|
+
EPROTO: 65,
|
|
2783
|
+
EMULTIHOP: 36,
|
|
2784
|
+
EDOTDOT: 125,
|
|
2785
|
+
EBADMSG: 9,
|
|
2786
|
+
ENOTUNIQ: 126,
|
|
2787
|
+
EBADFD: 127,
|
|
2788
|
+
EREMCHG: 128,
|
|
2789
|
+
ELIBACC: 129,
|
|
2790
|
+
ELIBBAD: 130,
|
|
2791
|
+
ELIBSCN: 131,
|
|
2792
|
+
ELIBMAX: 132,
|
|
2793
|
+
ELIBEXEC: 133,
|
|
2794
|
+
ENOSYS: 52,
|
|
2795
|
+
ENOTEMPTY: 55,
|
|
2796
|
+
ENAMETOOLONG: 37,
|
|
2797
|
+
ELOOP: 32,
|
|
2798
|
+
EOPNOTSUPP: 138,
|
|
2799
|
+
EPFNOSUPPORT: 139,
|
|
2800
|
+
ECONNRESET: 15,
|
|
2801
|
+
ENOBUFS: 42,
|
|
2802
|
+
EAFNOSUPPORT: 5,
|
|
2803
|
+
EPROTOTYPE: 67,
|
|
2804
|
+
ENOTSOCK: 57,
|
|
2805
|
+
ENOPROTOOPT: 50,
|
|
2806
|
+
ESHUTDOWN: 140,
|
|
2807
|
+
ECONNREFUSED: 14,
|
|
2808
|
+
EADDRINUSE: 3,
|
|
2809
|
+
ECONNABORTED: 13,
|
|
2810
|
+
ENETUNREACH: 40,
|
|
2811
|
+
ENETDOWN: 38,
|
|
2812
|
+
ETIMEDOUT: 73,
|
|
2813
|
+
EHOSTDOWN: 142,
|
|
2814
|
+
EHOSTUNREACH: 23,
|
|
2815
|
+
EINPROGRESS: 26,
|
|
2816
|
+
EALREADY: 7,
|
|
2817
|
+
EDESTADDRREQ: 17,
|
|
2818
|
+
EMSGSIZE: 35,
|
|
2819
|
+
EPROTONOSUPPORT: 66,
|
|
2820
|
+
ESOCKTNOSUPPORT: 137,
|
|
2821
|
+
EADDRNOTAVAIL: 4,
|
|
2822
|
+
ENETRESET: 39,
|
|
2823
|
+
EISCONN: 30,
|
|
2824
|
+
ENOTCONN: 53,
|
|
2825
|
+
ETOOMANYREFS: 141,
|
|
2826
|
+
EUSERS: 136,
|
|
2827
|
+
EDQUOT: 19,
|
|
2828
|
+
ESTALE: 72,
|
|
2829
|
+
ENOTSUP: 138,
|
|
2830
|
+
ENOMEDIUM: 148,
|
|
2831
|
+
EILSEQ: 25,
|
|
2832
|
+
EOVERFLOW: 61,
|
|
2833
|
+
ECANCELED: 11,
|
|
2834
|
+
ENOTRECOVERABLE: 56,
|
|
2835
|
+
EOWNERDEAD: 62,
|
|
2836
|
+
ESTRPIPE: 135
|
|
2837
|
+
}, function () {
|
|
2838
|
+
for (var e = new Array(256), r = 0; r < 256; ++r) e[r] = String.fromCharCode(r);
|
|
2839
|
+
Ue = e;
|
|
2840
|
+
}(), Ve = r.BindingError = Ge(Error, "BindingError"), qe = r.InternalError = Ge(Error, "InternalError"), wr.prototype.isAliasOf = Qe, wr.prototype.clone = gr, wr.prototype.delete = vr, wr.prototype.isDeleted = yr, wr.prototype.deleteLater = Er, r.getInheritedInstanceCount = ir, r.getLiveInheritedInstances = ar, r.flushPendingDeletes = lr, r.setDelayFunction = cr, Or.prototype.getPointee = Ar, Or.prototype.destructor = Fr, Or.prototype.argPackAdvance = 8, Or.prototype.readValueFromPointer = Pr, Or.prototype.deleteObject = Dr, Or.prototype.fromWireType = mr, Nr = r.UnboundTypeError = Ge(Error, "UnboundTypeError"), r.count_emval_handles = Gr, r.get_first_emval = Vr;
|
|
2841
|
+
var mt = {
|
|
2842
|
+
__syscall_fcntl64: function __syscall_fcntl64(e, r, t) {
|
|
2843
|
+
Le.varargs = t;
|
|
2844
|
+
try {
|
|
2845
|
+
var n = Le.getStreamFromFD(e);
|
|
2846
|
+
switch (r) {
|
|
2847
|
+
case 0:
|
|
2848
|
+
return (o = Le.get()) < 0 ? -28 : Ie.createStream(n, o).fd;
|
|
2849
|
+
case 1:
|
|
2850
|
+
case 2:
|
|
2851
|
+
case 6:
|
|
2852
|
+
case 7:
|
|
2853
|
+
return 0;
|
|
2854
|
+
case 3:
|
|
2855
|
+
return n.flags;
|
|
2856
|
+
case 4:
|
|
2857
|
+
var o = Le.get();
|
|
2858
|
+
return n.flags |= o, 0;
|
|
2859
|
+
case 5:
|
|
2860
|
+
o = Le.get();
|
|
2861
|
+
return B[o + 0 >> 1] = 2, 0;
|
|
2862
|
+
case 16:
|
|
2863
|
+
case 8:
|
|
2864
|
+
default:
|
|
2865
|
+
return -28;
|
|
2866
|
+
case 9:
|
|
2867
|
+
return i = 28, $[yt() >> 2] = i, -1;
|
|
2868
|
+
}
|
|
2869
|
+
} catch (e) {
|
|
2870
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
2871
|
+
return -e.errno;
|
|
2872
|
+
}
|
|
2873
|
+
var i;
|
|
2874
|
+
},
|
|
2875
|
+
__syscall_openat: function __syscall_openat(e, r, t, n) {
|
|
2876
|
+
Le.varargs = n;
|
|
2877
|
+
try {
|
|
2878
|
+
r = Le.getStr(r), r = Le.calculateAt(e, r);
|
|
2879
|
+
var o = n ? Le.get() : 0;
|
|
2880
|
+
return Ie.open(r, t, o).fd;
|
|
2881
|
+
} catch (e) {
|
|
2882
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
2883
|
+
return -e.errno;
|
|
2884
|
+
}
|
|
2885
|
+
},
|
|
2886
|
+
_embind_register_bigint: function _embind_register_bigint(e, r, t, n, o) {},
|
|
2887
|
+
_embind_register_bool: function _embind_register_bool(e, r, t, n, o) {
|
|
2888
|
+
var i = xe(t);
|
|
2889
|
+
Je(e, {
|
|
2890
|
+
name: r = Be(r),
|
|
2891
|
+
fromWireType: function fromWireType(e) {
|
|
2892
|
+
return !!e;
|
|
2893
|
+
},
|
|
2894
|
+
toWireType: function toWireType(e, r) {
|
|
2895
|
+
return r ? n : o;
|
|
2896
|
+
},
|
|
2897
|
+
argPackAdvance: 8,
|
|
2898
|
+
readValueFromPointer: function readValueFromPointer(e) {
|
|
2899
|
+
var n;
|
|
2900
|
+
if (1 === t) n = x;else if (2 === t) n = B;else {
|
|
2901
|
+
if (4 !== t) throw new TypeError("Unknown boolean type size: " + r);
|
|
2902
|
+
n = $;
|
|
2903
|
+
}
|
|
2904
|
+
return this.fromWireType(n[e >> i]);
|
|
2905
|
+
},
|
|
2906
|
+
destructorFunction: null
|
|
2907
|
+
});
|
|
2908
|
+
},
|
|
2909
|
+
_embind_register_class: function _embind_register_class(e, t, n, o, i, a, s, l, u, c, d, f, p) {
|
|
2910
|
+
d = Be(d), a = Mr(i, a), l && (l = Mr(s, l)), c && (c = Mr(u, c)), p = Mr(f, p);
|
|
2911
|
+
var m = ze(d);
|
|
2912
|
+
!function (e, t, n) {
|
|
2913
|
+
r.hasOwnProperty(e) ? ((void 0 === n || void 0 !== r[e].overloadTable && void 0 !== r[e].overloadTable[n]) && Ye("Cannot register public name '" + e + "' twice"), br(r, e, e), r.hasOwnProperty(n) && Ye("Cannot register multiple overloads of a function with the same number of arguments (" + n + ")!"), r[e].overloadTable[n] = t) : (r[e] = t, void 0 !== n && (r[e].numArguments = n));
|
|
2914
|
+
}(m, function () {
|
|
2915
|
+
Lr("Cannot construct " + d + " due to unbound types", [o]);
|
|
2916
|
+
}), Ke([e, t, n], o ? [o] : [], function (t) {
|
|
2917
|
+
var n, i;
|
|
2918
|
+
t = t[0], i = o ? (n = t.registeredClass).instancePrototype : wr.prototype;
|
|
2919
|
+
var s = He(m, function () {
|
|
2920
|
+
if (Object.getPrototypeOf(this) !== u) throw new Ve("Use 'new' to construct " + d);
|
|
2921
|
+
if (void 0 === f.constructor_body) throw new Ve(d + " has no accessible constructor");
|
|
2922
|
+
var e = f.constructor_body[arguments.length];
|
|
2923
|
+
if (void 0 === e) throw new Ve("Tried to invoke ctor of " + d + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(f.constructor_body).toString() + ") parameters instead!");
|
|
2924
|
+
return e.apply(this, arguments);
|
|
2925
|
+
}),
|
|
2926
|
+
u = Object.create(i, {
|
|
2927
|
+
constructor: {
|
|
2928
|
+
value: s
|
|
2929
|
+
}
|
|
2930
|
+
});
|
|
2931
|
+
s.prototype = u;
|
|
2932
|
+
var f = new _r(d, s, u, p, n, a, l, c),
|
|
2933
|
+
h = new Or(d, f, !0, !1, !1),
|
|
2934
|
+
g = new Or(d + "*", f, !1, !1, !1),
|
|
2935
|
+
v = new Or(d + " const*", f, !1, !0, !1);
|
|
2936
|
+
return or[e] = {
|
|
2937
|
+
pointerType: g,
|
|
2938
|
+
constPointerType: v
|
|
2939
|
+
}, function (e, t, n) {
|
|
2940
|
+
r.hasOwnProperty(e) || Xe("Replacing nonexistant public symbol"), void 0 !== r[e].overloadTable && void 0 !== n ? r[e].overloadTable[n] = t : (r[e] = t, r[e].argCount = n);
|
|
2941
|
+
}(m, s), [h, g, v];
|
|
2942
|
+
});
|
|
2943
|
+
},
|
|
2944
|
+
_embind_register_class_constructor: function _embind_register_class_constructor(e, r, t, n, o, i) {
|
|
2945
|
+
F(r > 0);
|
|
2946
|
+
var a = xr(r, t);
|
|
2947
|
+
o = Mr(n, o), Ke([], [e], function (e) {
|
|
2948
|
+
var t = "constructor " + (e = e[0]).name;
|
|
2949
|
+
if (void 0 === e.registeredClass.constructor_body && (e.registeredClass.constructor_body = []), void 0 !== e.registeredClass.constructor_body[r - 1]) throw new Ve("Cannot register multiple constructors with identical number of parameters (" + (r - 1) + ") for class '" + e.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!");
|
|
2950
|
+
return e.registeredClass.constructor_body[r - 1] = function () {
|
|
2951
|
+
Lr("Cannot construct " + e.name + " due to unbound types", a);
|
|
2952
|
+
}, Ke([], a, function (n) {
|
|
2953
|
+
return n.splice(1, 0, null), e.registeredClass.constructor_body[r - 1] = jr(t, n, null, o, i), [];
|
|
2954
|
+
}), [];
|
|
2955
|
+
});
|
|
2956
|
+
},
|
|
2957
|
+
_embind_register_class_function: function _embind_register_class_function(e, r, t, n, o, i, a, s) {
|
|
2958
|
+
var l = xr(t, n);
|
|
2959
|
+
r = Be(r), i = Mr(o, i), Ke([], [e], function (e) {
|
|
2960
|
+
var n = (e = e[0]).name + "." + r;
|
|
2961
|
+
function o() {
|
|
2962
|
+
Lr("Cannot call " + n + " due to unbound types", l);
|
|
2963
|
+
}
|
|
2964
|
+
r.startsWith("@@") && (r = Symbol[r.substring(2)]), s && e.registeredClass.pureVirtualFunctions.push(r);
|
|
2965
|
+
var u = e.registeredClass.instancePrototype,
|
|
2966
|
+
c = u[r];
|
|
2967
|
+
return void 0 === c || void 0 === c.overloadTable && c.className !== e.name && c.argCount === t - 2 ? (o.argCount = t - 2, o.className = e.name, u[r] = o) : (br(u, r, n), u[r].overloadTable[t - 2] = o), Ke([], l, function (o) {
|
|
2968
|
+
var s = jr(n, o, e, i, a);
|
|
2969
|
+
return void 0 === u[r].overloadTable ? (s.argCount = t - 2, u[r] = s) : u[r].overloadTable[t - 2] = s, [];
|
|
2970
|
+
}), [];
|
|
2971
|
+
});
|
|
2972
|
+
},
|
|
2973
|
+
_embind_register_class_property: function _embind_register_class_property(e, r, t, n, o, i, a, s, l, u) {
|
|
2974
|
+
r = Be(r), o = Mr(n, o), Ke([], [e], function (e) {
|
|
2975
|
+
var n = (e = e[0]).name + "." + r,
|
|
2976
|
+
c = {
|
|
2977
|
+
get: function get() {
|
|
2978
|
+
Lr("Cannot access " + n + " due to unbound types", [t, a]);
|
|
2979
|
+
},
|
|
2980
|
+
enumerable: !0,
|
|
2981
|
+
configurable: !0
|
|
2982
|
+
};
|
|
2983
|
+
return c.set = l ? function () {
|
|
2984
|
+
Lr("Cannot access " + n + " due to unbound types", [t, a]);
|
|
2985
|
+
} : function (e) {
|
|
2986
|
+
Ye(n + " is a read-only property");
|
|
2987
|
+
}, Object.defineProperty(e.registeredClass.instancePrototype, r, c), Ke([], l ? [t, a] : [t], function (t) {
|
|
2988
|
+
var a = t[0],
|
|
2989
|
+
c = {
|
|
2990
|
+
get: function get() {
|
|
2991
|
+
var r = $r(this, e, n + " getter");
|
|
2992
|
+
return a.fromWireType(o(i, r));
|
|
2993
|
+
},
|
|
2994
|
+
enumerable: !0
|
|
2995
|
+
};
|
|
2996
|
+
if (l) {
|
|
2997
|
+
l = Mr(s, l);
|
|
2998
|
+
var d = t[1];
|
|
2999
|
+
c.set = function (r) {
|
|
3000
|
+
var t = $r(this, e, n + " setter"),
|
|
3001
|
+
o = [];
|
|
3002
|
+
l(u, t, d.toWireType(o, r)), Ur(o);
|
|
3003
|
+
};
|
|
3004
|
+
}
|
|
3005
|
+
return Object.defineProperty(e.registeredClass.instancePrototype, r, c), [];
|
|
3006
|
+
}), [];
|
|
3007
|
+
});
|
|
3008
|
+
},
|
|
3009
|
+
_embind_register_emval: function _embind_register_emval(e, r) {
|
|
3010
|
+
Je(e, {
|
|
3011
|
+
name: r = Be(r),
|
|
3012
|
+
fromWireType: function fromWireType(e) {
|
|
3013
|
+
var r = Yr.toValue(e);
|
|
3014
|
+
return Hr(e), r;
|
|
3015
|
+
},
|
|
3016
|
+
toWireType: function toWireType(e, r) {
|
|
3017
|
+
return Yr.toHandle(r);
|
|
3018
|
+
},
|
|
3019
|
+
argPackAdvance: 8,
|
|
3020
|
+
readValueFromPointer: Pr,
|
|
3021
|
+
destructorFunction: null
|
|
3022
|
+
});
|
|
3023
|
+
},
|
|
3024
|
+
_embind_register_float: function _embind_register_float(e, r, t) {
|
|
3025
|
+
var n = xe(t);
|
|
3026
|
+
Je(e, {
|
|
3027
|
+
name: r = Be(r),
|
|
3028
|
+
fromWireType: function fromWireType(e) {
|
|
3029
|
+
return e;
|
|
3030
|
+
},
|
|
3031
|
+
toWireType: function toWireType(e, r) {
|
|
3032
|
+
if ("number" != typeof r && "boolean" != typeof r) throw new TypeError('Cannot convert "' + qr(r) + '" to ' + this.name);
|
|
3033
|
+
return r;
|
|
3034
|
+
},
|
|
3035
|
+
argPackAdvance: 8,
|
|
3036
|
+
readValueFromPointer: Xr(r, n),
|
|
3037
|
+
destructorFunction: null
|
|
3038
|
+
});
|
|
3039
|
+
},
|
|
3040
|
+
_embind_register_integer: function _embind_register_integer(e, r, t, n, o) {
|
|
3041
|
+
r = Be(r), -1 === o && (o = 4294967295);
|
|
3042
|
+
var i = xe(t),
|
|
3043
|
+
a = function a(e) {
|
|
3044
|
+
return e;
|
|
3045
|
+
};
|
|
3046
|
+
if (0 === n) {
|
|
3047
|
+
var s = 32 - 8 * t;
|
|
3048
|
+
a = function a(e) {
|
|
3049
|
+
return e << s >>> s;
|
|
3050
|
+
};
|
|
3051
|
+
}
|
|
3052
|
+
var l = r.includes("unsigned"),
|
|
3053
|
+
u = function u(e, t) {
|
|
3054
|
+
if ("number" != typeof e && "boolean" != typeof e) throw new TypeError('Cannot convert "' + qr(e) + '" to ' + t);
|
|
3055
|
+
if (e < n || e > o) throw new TypeError('Passing a number "' + qr(e) + '" from JS side to C/C++ side to an argument of type "' + r + '", which is outside the valid range [' + n + ", " + o + "]!");
|
|
3056
|
+
};
|
|
3057
|
+
Je(e, {
|
|
3058
|
+
name: r,
|
|
3059
|
+
fromWireType: a,
|
|
3060
|
+
toWireType: l ? function (e, r) {
|
|
3061
|
+
return u(r, this.name), r >>> 0;
|
|
3062
|
+
} : function (e, r) {
|
|
3063
|
+
return u(r, this.name), r;
|
|
3064
|
+
},
|
|
3065
|
+
argPackAdvance: 8,
|
|
3066
|
+
readValueFromPointer: Kr(r, i, 0 !== n),
|
|
3067
|
+
destructorFunction: null
|
|
3068
|
+
});
|
|
3069
|
+
},
|
|
3070
|
+
_embind_register_memory_view: function _embind_register_memory_view(e, r, t) {
|
|
3071
|
+
var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][r];
|
|
3072
|
+
function o(e) {
|
|
3073
|
+
var r = W,
|
|
3074
|
+
t = r[e >>= 2],
|
|
3075
|
+
o = r[e + 1];
|
|
3076
|
+
return new n(L, o, t);
|
|
3077
|
+
}
|
|
3078
|
+
Je(e, {
|
|
3079
|
+
name: t = Be(t),
|
|
3080
|
+
fromWireType: o,
|
|
3081
|
+
argPackAdvance: 8,
|
|
3082
|
+
readValueFromPointer: o
|
|
3083
|
+
}, {
|
|
3084
|
+
ignoreDuplicateRegistrations: !0
|
|
3085
|
+
});
|
|
3086
|
+
},
|
|
3087
|
+
_embind_register_std_string: function _embind_register_std_string(e, r) {
|
|
3088
|
+
var t = "std::string" === (r = Be(r));
|
|
3089
|
+
Je(e, {
|
|
3090
|
+
name: r,
|
|
3091
|
+
fromWireType: function fromWireType(e) {
|
|
3092
|
+
var r,
|
|
3093
|
+
n = W[e >> 2];
|
|
3094
|
+
if (t) for (var o = e + 4, i = 0; i <= n; ++i) {
|
|
3095
|
+
var a = e + 4 + i;
|
|
3096
|
+
if (i == n || 0 == U[a]) {
|
|
3097
|
+
var s = R(o, a - o);
|
|
3098
|
+
void 0 === r ? r = s : (r += String.fromCharCode(0), r += s), o = a + 1;
|
|
3099
|
+
}
|
|
3100
|
+
} else {
|
|
3101
|
+
var l = new Array(n);
|
|
3102
|
+
for (i = 0; i < n; ++i) l[i] = String.fromCharCode(U[e + 4 + i]);
|
|
3103
|
+
r = l.join("");
|
|
3104
|
+
}
|
|
3105
|
+
return ht(e), r;
|
|
3106
|
+
},
|
|
3107
|
+
toWireType: function toWireType(e, r) {
|
|
3108
|
+
r instanceof ArrayBuffer && (r = new Uint8Array(r));
|
|
3109
|
+
var n = "string" == typeof r;
|
|
3110
|
+
n || r instanceof Uint8Array || r instanceof Uint8ClampedArray || r instanceof Int8Array || Ye("Cannot pass non-string to std::string");
|
|
3111
|
+
var o = (t && n ? function () {
|
|
3112
|
+
return I(r);
|
|
3113
|
+
} : function () {
|
|
3114
|
+
return r.length;
|
|
3115
|
+
})(),
|
|
3116
|
+
i = gt(4 + o + 1);
|
|
3117
|
+
if (W[i >> 2] = o, t && n) N(r, i + 4, o + 1);else if (n) for (var a = 0; a < o; ++a) {
|
|
3118
|
+
var s = r.charCodeAt(a);
|
|
3119
|
+
s > 255 && (ht(i), Ye("String has UTF-16 code units that do not fit in 8 bits")), U[i + 4 + a] = s;
|
|
3120
|
+
} else for (a = 0; a < o; ++a) U[i + 4 + a] = r[a];
|
|
3121
|
+
return null !== e && e.push(ht, i), i;
|
|
3122
|
+
},
|
|
3123
|
+
argPackAdvance: 8,
|
|
3124
|
+
readValueFromPointer: Pr,
|
|
3125
|
+
destructorFunction: function destructorFunction(e) {
|
|
3126
|
+
ht(e);
|
|
3127
|
+
}
|
|
3128
|
+
});
|
|
3129
|
+
},
|
|
3130
|
+
_embind_register_std_wstring: function _embind_register_std_wstring(e, r, t) {
|
|
3131
|
+
var n, o, i, a, s;
|
|
3132
|
+
t = Be(t), 2 === r ? (n = V, o = Y, a = q, i = function i() {
|
|
3133
|
+
return j;
|
|
3134
|
+
}, s = 1) : 4 === r && (n = X, o = K, a = J, i = function i() {
|
|
3135
|
+
return W;
|
|
3136
|
+
}, s = 2), Je(e, {
|
|
3137
|
+
name: t,
|
|
3138
|
+
fromWireType: function fromWireType(e) {
|
|
3139
|
+
for (var t, o = W[e >> 2], a = i(), l = e + 4, u = 0; u <= o; ++u) {
|
|
3140
|
+
var c = e + 4 + u * r;
|
|
3141
|
+
if (u == o || 0 == a[c >> s]) {
|
|
3142
|
+
var d = n(l, c - l);
|
|
3143
|
+
void 0 === t ? t = d : (t += String.fromCharCode(0), t += d), l = c + r;
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
3146
|
+
return ht(e), t;
|
|
3147
|
+
},
|
|
3148
|
+
toWireType: function toWireType(e, n) {
|
|
3149
|
+
"string" != typeof n && Ye("Cannot pass non-string to C++ string type " + t);
|
|
3150
|
+
var i = a(n),
|
|
3151
|
+
l = gt(4 + i + r);
|
|
3152
|
+
return W[l >> 2] = i >> s, o(n, l + 4, i + r), null !== e && e.push(ht, l), l;
|
|
3153
|
+
},
|
|
3154
|
+
argPackAdvance: 8,
|
|
3155
|
+
readValueFromPointer: Pr,
|
|
3156
|
+
destructorFunction: function destructorFunction(e) {
|
|
3157
|
+
ht(e);
|
|
3158
|
+
}
|
|
3159
|
+
});
|
|
3160
|
+
},
|
|
3161
|
+
_embind_register_void: function _embind_register_void(e, r) {
|
|
3162
|
+
Je(e, {
|
|
3163
|
+
isVoid: !0,
|
|
3164
|
+
name: r = Be(r),
|
|
3165
|
+
argPackAdvance: 0,
|
|
3166
|
+
fromWireType: function fromWireType() {},
|
|
3167
|
+
toWireType: function toWireType(e, r) {}
|
|
3168
|
+
});
|
|
3169
|
+
},
|
|
3170
|
+
_emscripten_date_now: function _emscripten_date_now() {
|
|
3171
|
+
return Date.now();
|
|
3172
|
+
},
|
|
3173
|
+
_emval_as: function _emval_as(e, r, t) {
|
|
3174
|
+
e = Yr.toValue(e), r = Jr(r, "emval::as");
|
|
3175
|
+
var n = [],
|
|
3176
|
+
o = Yr.toHandle(n);
|
|
3177
|
+
return $[t >> 2] = o, r.toWireType(n, e);
|
|
3178
|
+
},
|
|
3179
|
+
_emval_call_void_method: function _emval_call_void_method(e, r, t, n) {
|
|
3180
|
+
var o, i;
|
|
3181
|
+
(e = Zr[e])(r = Yr.toValue(r), t = void 0 === (i = Qr[o = t]) ? Be(o) : i, null, n);
|
|
3182
|
+
},
|
|
3183
|
+
_emval_decref: Hr,
|
|
3184
|
+
_emval_get_method_caller: function _emval_get_method_caller(e, r) {
|
|
3185
|
+
var t = function (e, r) {
|
|
3186
|
+
for (var t = new Array(e), n = 0; n < e; ++n) t[n] = Jr($[(r >> 2) + n], "parameter " + n);
|
|
3187
|
+
return t;
|
|
3188
|
+
}(e, r),
|
|
3189
|
+
n = t[0],
|
|
3190
|
+
o = n.name + "_$" + t.slice(1).map(function (e) {
|
|
3191
|
+
return e.name;
|
|
3192
|
+
}).join("_") + "$",
|
|
3193
|
+
i = et[o];
|
|
3194
|
+
if (void 0 !== i) return i;
|
|
3195
|
+
for (var a = ["retType"], s = [n], l = "", u = 0; u < e - 1; ++u) l += (0 !== u ? ", " : "") + "arg" + u, a.push("argType" + u), s.push(t[1 + u]);
|
|
3196
|
+
var c = "return function " + ze("methodCaller_" + o) + "(handle, name, destructors, args) {\n",
|
|
3197
|
+
d = 0;
|
|
3198
|
+
for (u = 0; u < e - 1; ++u) c += " var arg" + u + " = argType" + u + ".readValueFromPointer(args" + (d ? "+" + d : "") + ");\n", d += t[u + 1].argPackAdvance;
|
|
3199
|
+
for (c += " var rv = handle[name](" + l + ");\n", u = 0; u < e - 1; ++u) t[u + 1].deleteObject && (c += " argType" + u + ".deleteObject(arg" + u + ");\n");
|
|
3200
|
+
n.isVoid || (c += " return retType.toWireType(destructors, rv);\n"), c += "};\n", a.push(c);
|
|
3201
|
+
var f,
|
|
3202
|
+
p,
|
|
3203
|
+
m = Br(Function, a).apply(null, s);
|
|
3204
|
+
return f = m, p = Zr.length, Zr.push(f), i = p, et[o] = i, i;
|
|
3205
|
+
},
|
|
3206
|
+
_emval_incref: function _emval_incref(e) {
|
|
3207
|
+
e > 4 && (zr[e].refcount += 1);
|
|
3208
|
+
},
|
|
3209
|
+
_emval_run_destructors: function _emval_run_destructors(e) {
|
|
3210
|
+
Ur(Yr.toValue(e)), Hr(e);
|
|
3211
|
+
},
|
|
3212
|
+
_emval_take_value: function _emval_take_value(e, r) {
|
|
3213
|
+
var t = (e = Jr(e, "_emval_take_value")).readValueFromPointer(r);
|
|
3214
|
+
return Yr.toHandle(t);
|
|
3215
|
+
},
|
|
3216
|
+
_gmtime_js: function _gmtime_js(e, r) {
|
|
3217
|
+
var t = new Date(1e3 * $[e >> 2]);
|
|
3218
|
+
$[r >> 2] = t.getUTCSeconds(), $[r + 4 >> 2] = t.getUTCMinutes(), $[r + 8 >> 2] = t.getUTCHours(), $[r + 12 >> 2] = t.getUTCDate(), $[r + 16 >> 2] = t.getUTCMonth(), $[r + 20 >> 2] = t.getUTCFullYear() - 1900, $[r + 24 >> 2] = t.getUTCDay();
|
|
3219
|
+
var n = Date.UTC(t.getUTCFullYear(), 0, 1, 0, 0, 0, 0),
|
|
3220
|
+
o = (t.getTime() - n) / 864e5 | 0;
|
|
3221
|
+
$[r + 28 >> 2] = o;
|
|
3222
|
+
},
|
|
3223
|
+
_localtime_js: function _localtime_js(e, r) {
|
|
3224
|
+
var t = new Date(1e3 * $[e >> 2]);
|
|
3225
|
+
$[r >> 2] = t.getSeconds(), $[r + 4 >> 2] = t.getMinutes(), $[r + 8 >> 2] = t.getHours(), $[r + 12 >> 2] = t.getDate(), $[r + 16 >> 2] = t.getMonth(), $[r + 20 >> 2] = t.getFullYear() - 1900, $[r + 24 >> 2] = t.getDay();
|
|
3226
|
+
var n = new Date(t.getFullYear(), 0, 1),
|
|
3227
|
+
o = (t.getTime() - n.getTime()) / 864e5 | 0;
|
|
3228
|
+
$[r + 28 >> 2] = o, $[r + 36 >> 2] = -60 * t.getTimezoneOffset();
|
|
3229
|
+
var i = new Date(t.getFullYear(), 6, 1).getTimezoneOffset(),
|
|
3230
|
+
a = n.getTimezoneOffset(),
|
|
3231
|
+
s = 0 | (i != a && t.getTimezoneOffset() == Math.min(a, i));
|
|
3232
|
+
$[r + 32 >> 2] = s;
|
|
3233
|
+
},
|
|
3234
|
+
_mktime_js: function _mktime_js(e) {
|
|
3235
|
+
var r = new Date($[e + 20 >> 2] + 1900, $[e + 16 >> 2], $[e + 12 >> 2], $[e + 8 >> 2], $[e + 4 >> 2], $[e >> 2], 0),
|
|
3236
|
+
t = $[e + 32 >> 2],
|
|
3237
|
+
n = r.getTimezoneOffset(),
|
|
3238
|
+
o = new Date(r.getFullYear(), 0, 1),
|
|
3239
|
+
i = new Date(r.getFullYear(), 6, 1).getTimezoneOffset(),
|
|
3240
|
+
a = o.getTimezoneOffset(),
|
|
3241
|
+
s = Math.min(a, i);
|
|
3242
|
+
if (t < 0) $[e + 32 >> 2] = Number(i != a && s == n);else if (t > 0 != (s == n)) {
|
|
3243
|
+
var l = Math.max(a, i),
|
|
3244
|
+
u = t > 0 ? s : l;
|
|
3245
|
+
r.setTime(r.getTime() + 6e4 * (u - n));
|
|
3246
|
+
}
|
|
3247
|
+
$[e + 24 >> 2] = r.getDay();
|
|
3248
|
+
var c = (r.getTime() - o.getTime()) / 864e5 | 0;
|
|
3249
|
+
return $[e + 28 >> 2] = c, $[e >> 2] = r.getSeconds(), $[e + 4 >> 2] = r.getMinutes(), $[e + 8 >> 2] = r.getHours(), $[e + 12 >> 2] = r.getDate(), $[e + 16 >> 2] = r.getMonth(), r.getTime() / 1e3 | 0;
|
|
3250
|
+
},
|
|
3251
|
+
_tzset_js: function e(r, t, n) {
|
|
3252
|
+
e.called || (e.called = !0, function (e, r, t) {
|
|
3253
|
+
var n = new Date().getFullYear(),
|
|
3254
|
+
o = new Date(n, 0, 1),
|
|
3255
|
+
i = new Date(n, 6, 1),
|
|
3256
|
+
a = o.getTimezoneOffset(),
|
|
3257
|
+
s = i.getTimezoneOffset(),
|
|
3258
|
+
l = Math.max(a, s);
|
|
3259
|
+
function u(e) {
|
|
3260
|
+
var r = e.toTimeString().match(/\(([A-Za-z ]+)\)$/);
|
|
3261
|
+
return r ? r[1] : "GMT";
|
|
3262
|
+
}
|
|
3263
|
+
$[e >> 2] = 60 * l, $[r >> 2] = Number(a != s);
|
|
3264
|
+
var c = u(o),
|
|
3265
|
+
d = u(i),
|
|
3266
|
+
f = Q(c),
|
|
3267
|
+
p = Q(d);
|
|
3268
|
+
s < a ? ($[t >> 2] = f, $[t + 4 >> 2] = p) : ($[t >> 2] = p, $[t + 4 >> 2] = f);
|
|
3269
|
+
}(r, t, n));
|
|
3270
|
+
},
|
|
3271
|
+
abort: function abort() {
|
|
3272
|
+
ge("native code called abort()");
|
|
3273
|
+
},
|
|
3274
|
+
emscripten_log: function emscripten_log(e, r, t) {
|
|
3275
|
+
at(e, O(ot(r, t), 0));
|
|
3276
|
+
},
|
|
3277
|
+
emscripten_resize_heap: function emscripten_resize_heap(e) {
|
|
3278
|
+
var r = U.length;
|
|
3279
|
+
F((e >>>= 0) > r);
|
|
3280
|
+
var t,
|
|
3281
|
+
n,
|
|
3282
|
+
o = 2147483648;
|
|
3283
|
+
if (e > o) return _("Cannot enlarge memory, asked to go up to " + e + " bytes, but the limit is " + "2147483648 bytes!"), !1;
|
|
3284
|
+
for (var i = 1; i <= 4; i *= 2) {
|
|
3285
|
+
var a = r * (1 + .2 / i);
|
|
3286
|
+
a = Math.min(a, e + 100663296);
|
|
3287
|
+
var s = Math.min(o, (t = Math.max(e, a)) + ((n = 65536) - t % n) % n);
|
|
3288
|
+
if (st(s)) return !0;
|
|
3289
|
+
}
|
|
3290
|
+
return _("Failed to grow the heap from " + r + " bytes to " + s + " bytes, not enough memory!"), !1;
|
|
3291
|
+
},
|
|
3292
|
+
environ_get: function environ_get(e, r) {
|
|
3293
|
+
var t = 0;
|
|
3294
|
+
return ut().forEach(function (n, o) {
|
|
3295
|
+
var i = r + t;
|
|
3296
|
+
$[e + 4 * o >> 2] = i, function (e, r, t) {
|
|
3297
|
+
for (var n = 0; n < e.length; ++n) F(e.charCodeAt(n) === (255 & e.charCodeAt(n))), x[r++ >> 0] = e.charCodeAt(n);
|
|
3298
|
+
t || (x[r >> 0] = 0);
|
|
3299
|
+
}(n, i), t += n.length + 1;
|
|
3300
|
+
}), 0;
|
|
3301
|
+
},
|
|
3302
|
+
environ_sizes_get: function environ_sizes_get(e, r) {
|
|
3303
|
+
var t = ut();
|
|
3304
|
+
$[e >> 2] = t.length;
|
|
3305
|
+
var n = 0;
|
|
3306
|
+
return t.forEach(function (e) {
|
|
3307
|
+
n += e.length + 1;
|
|
3308
|
+
}), $[r >> 2] = n, 0;
|
|
3309
|
+
},
|
|
3310
|
+
fd_close: function fd_close(e) {
|
|
3311
|
+
try {
|
|
3312
|
+
var r = Le.getStreamFromFD(e);
|
|
3313
|
+
return Ie.close(r), 0;
|
|
3314
|
+
} catch (e) {
|
|
3315
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
3316
|
+
return e.errno;
|
|
3317
|
+
}
|
|
3318
|
+
},
|
|
3319
|
+
fd_fdstat_get: function fd_fdstat_get(e, r) {
|
|
3320
|
+
try {
|
|
3321
|
+
var t = Le.getStreamFromFD(e),
|
|
3322
|
+
n = t.tty ? 2 : Ie.isDir(t.mode) ? 3 : Ie.isLink(t.mode) ? 7 : 4;
|
|
3323
|
+
return x[r >> 0] = n, 0;
|
|
3324
|
+
} catch (e) {
|
|
3325
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
3326
|
+
return e.errno;
|
|
3327
|
+
}
|
|
3328
|
+
},
|
|
3329
|
+
fd_read: function fd_read(e, r, t, n) {
|
|
3330
|
+
try {
|
|
3331
|
+
var o = Le.getStreamFromFD(e),
|
|
3332
|
+
i = Le.doReadv(o, r, t);
|
|
3333
|
+
return $[n >> 2] = i, 0;
|
|
3334
|
+
} catch (e) {
|
|
3335
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
3336
|
+
return e.errno;
|
|
3337
|
+
}
|
|
3338
|
+
},
|
|
3339
|
+
fd_seek: function fd_seek(e, r, t, n, o) {
|
|
3340
|
+
try {
|
|
3341
|
+
var i = Le.getStreamFromFD(e),
|
|
3342
|
+
a = 4294967296 * t + (r >>> 0),
|
|
3343
|
+
s = 9007199254740992;
|
|
3344
|
+
return a <= -s || a >= s ? -61 : (Ie.llseek(i, a, n), Ee = [i.position >>> 0, (ye = i.position, +Math.abs(ye) >= 1 ? ye > 0 ? (0 | Math.min(+Math.floor(ye / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ye - +(~~ye >>> 0)) / 4294967296) >>> 0 : 0)], $[o >> 2] = Ee[0], $[o + 4 >> 2] = Ee[1], i.getdents && 0 === a && 0 === n && (i.getdents = null), 0);
|
|
3345
|
+
} catch (e) {
|
|
3346
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
3347
|
+
return e.errno;
|
|
3348
|
+
}
|
|
3349
|
+
},
|
|
3350
|
+
fd_write: function fd_write(e, r, t, n) {
|
|
3351
|
+
try {
|
|
3352
|
+
var o = Le.getStreamFromFD(e),
|
|
3353
|
+
i = Le.doWritev(o, r, t);
|
|
3354
|
+
return $[n >> 2] = i, 0;
|
|
3355
|
+
} catch (e) {
|
|
3356
|
+
if (void 0 === Ie || !(e instanceof Ie.ErrnoError)) throw e;
|
|
3357
|
+
return e.errno;
|
|
3358
|
+
}
|
|
3359
|
+
},
|
|
3360
|
+
setTempRet0: function setTempRet0(e) {}
|
|
3361
|
+
};
|
|
3362
|
+
!function () {
|
|
3363
|
+
var e = {
|
|
3364
|
+
env: mt,
|
|
3365
|
+
wasi_snapshot_preview1: mt
|
|
3366
|
+
};
|
|
3367
|
+
function t(e, t) {
|
|
3368
|
+
var n,
|
|
3369
|
+
o = e.exports;
|
|
3370
|
+
r.asm = o, F(w = r.asm.memory, "memory not found in wasm exports"), Z(w.buffer), F(re = r.asm.__indirect_function_table, "table not found in wasm exports"), n = r.asm.__wasm_call_ctors, ae.unshift(n), he("wasm-instantiate");
|
|
3371
|
+
}
|
|
3372
|
+
me("wasm-instantiate");
|
|
3373
|
+
var n = r;
|
|
3374
|
+
function o(e) {
|
|
3375
|
+
F(r === n, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"), n = null, t(e.instance);
|
|
3376
|
+
}
|
|
3377
|
+
function i(r) {
|
|
3378
|
+
return function () {
|
|
3379
|
+
if (!E && (s || l)) {
|
|
3380
|
+
if ("function" == typeof fetch && !be(ve)) return fetch(ve, {
|
|
3381
|
+
credentials: "same-origin"
|
|
3382
|
+
}).then(function (e) {
|
|
3383
|
+
if (!e.ok) throw "failed to load wasm binary file at '" + ve + "'";
|
|
3384
|
+
return e.arrayBuffer();
|
|
3385
|
+
}).catch(function () {
|
|
3386
|
+
return Te(ve);
|
|
3387
|
+
});
|
|
3388
|
+
if (f) return new Promise(function (e, r) {
|
|
3389
|
+
f(ve, function (r) {
|
|
3390
|
+
e(new Uint8Array(r));
|
|
3391
|
+
}, r);
|
|
3392
|
+
});
|
|
3393
|
+
}
|
|
3394
|
+
return Promise.resolve().then(function () {
|
|
3395
|
+
return Te(ve);
|
|
3396
|
+
});
|
|
3397
|
+
}().then(function (r) {
|
|
3398
|
+
return WebAssembly.instantiate(r, e);
|
|
3399
|
+
}).then(function (e) {
|
|
3400
|
+
return e;
|
|
3401
|
+
}).then(r, function (e) {
|
|
3402
|
+
_("failed to asynchronously prepare wasm: " + e), be(ve) && _("warning: Loading from a file URI (" + ve + ") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"), ge(e);
|
|
3403
|
+
});
|
|
3404
|
+
}
|
|
3405
|
+
if (r.instantiateWasm) try {
|
|
3406
|
+
return r.instantiateWasm(e, t);
|
|
3407
|
+
} catch (e) {
|
|
3408
|
+
return _("Module.instantiateWasm callback failed with error: " + e), !1;
|
|
3409
|
+
}
|
|
3410
|
+
E || "function" != typeof WebAssembly.instantiateStreaming || we(ve) || be(ve) || "function" != typeof fetch ? i(o) : fetch(ve, {
|
|
3411
|
+
credentials: "same-origin"
|
|
3412
|
+
}).then(function (r) {
|
|
3413
|
+
return WebAssembly.instantiateStreaming(r, e).then(o, function (e) {
|
|
3414
|
+
return _("wasm streaming compile failed: " + e), _("falling back to ArrayBuffer instantiation"), i(o);
|
|
3415
|
+
});
|
|
3416
|
+
});
|
|
3417
|
+
}(), r.___wasm_call_ctors = _e("__wasm_call_ctors");
|
|
3418
|
+
var ht = r._free = _e("free"),
|
|
3419
|
+
gt = r._malloc = _e("malloc"),
|
|
3420
|
+
vt = r._strlen = _e("strlen"),
|
|
3421
|
+
yt = r.___errno_location = _e("__errno_location"),
|
|
3422
|
+
Et = r.___getTypeName = _e("__getTypeName");
|
|
3423
|
+
r.___embind_register_native_and_builtin_types = _e("__embind_register_native_and_builtin_types");
|
|
3424
|
+
var wt = r.___stdio_exit = _e("__stdio_exit"),
|
|
3425
|
+
bt = r._emscripten_builtin_memalign = _e("emscripten_builtin_memalign"),
|
|
3426
|
+
_t = r._emscripten_stack_init = function () {
|
|
3427
|
+
return (_t = r._emscripten_stack_init = r.asm.emscripten_stack_init).apply(null, arguments);
|
|
3428
|
+
};
|
|
3429
|
+
r._emscripten_stack_get_free = function () {
|
|
3430
|
+
return (r._emscripten_stack_get_free = r.asm.emscripten_stack_get_free).apply(null, arguments);
|
|
3431
|
+
}, r._emscripten_stack_get_base = function () {
|
|
3432
|
+
return (r._emscripten_stack_get_base = r.asm.emscripten_stack_get_base).apply(null, arguments);
|
|
3433
|
+
};
|
|
3434
|
+
var Tt,
|
|
3435
|
+
kt = r._emscripten_stack_get_end = function () {
|
|
3436
|
+
return (kt = r._emscripten_stack_get_end = r.asm.emscripten_stack_get_end).apply(null, arguments);
|
|
3437
|
+
};
|
|
3438
|
+
function St(e) {
|
|
3439
|
+
this.name = "ExitStatus", this.message = "Program terminated with exit(" + e + ")", this.status = e;
|
|
3440
|
+
}
|
|
3441
|
+
function Ct(e) {
|
|
3442
|
+
function t() {
|
|
3443
|
+
Tt || (Tt = !0, r.calledRun = !0, A || (oe(), F(!le), le = !0, r.noFSInit || Ie.init.initialized || Ie.init(), Ie.ignorePermissions = !1, ke(ae), r.onRuntimeInitialized && r.onRuntimeInitialized(), F(!r._main, 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'), function () {
|
|
3444
|
+
if (oe(), r.postRun) for ("function" == typeof r.postRun && (r.postRun = [r.postRun]); r.postRun.length;) e = r.postRun.shift(), se.unshift(e);
|
|
3445
|
+
var e;
|
|
3446
|
+
ke(se);
|
|
3447
|
+
}()));
|
|
3448
|
+
}
|
|
3449
|
+
ue > 0 || (_t(), ne(), function () {
|
|
3450
|
+
if (r.preRun) for ("function" == typeof r.preRun && (r.preRun = [r.preRun]); r.preRun.length;) e = r.preRun.shift(), ie.unshift(e);
|
|
3451
|
+
var e;
|
|
3452
|
+
ke(ie);
|
|
3453
|
+
}(), ue > 0 || (r.setStatus ? (r.setStatus("Running..."), setTimeout(function () {
|
|
3454
|
+
setTimeout(function () {
|
|
3455
|
+
r.setStatus("");
|
|
3456
|
+
}, 1), t();
|
|
3457
|
+
}, 1)) : t(), oe()));
|
|
3458
|
+
}
|
|
3459
|
+
if (r.stackSave = _e("stackSave"), r.stackRestore = _e("stackRestore"), r.stackAlloc = _e("stackAlloc"), r.dynCall_ijiii = _e("dynCall_ijiii"), r.dynCall_viiijj = _e("dynCall_viiijj"), r.dynCall_jij = _e("dynCall_jij"), r.dynCall_jii = _e("dynCall_jii"), r.dynCall_jiji = _e("dynCall_jiji"), r._ff_h264_cabac_tables = 112940, P("intArrayFromString", !1), P("intArrayToString", !1), P("ccall", !1), P("cwrap", !1), P("setValue", !1), P("getValue", !1), P("allocate", !1), P("UTF8ArrayToString", !1), P("UTF8ToString", !1), P("stringToUTF8Array", !1), P("stringToUTF8", !1), P("lengthBytesUTF8", !1), P("stackTrace", !1), P("addOnPreRun", !1), P("addOnInit", !1), P("addOnPreMain", !1), P("addOnExit", !1), P("addOnPostRun", !1), P("writeStringToMemory", !1), P("writeArrayToMemory", !1), P("writeAsciiToMemory", !1), P("addRunDependency", !0), P("removeRunDependency", !0), P("FS_createFolder", !1), P("FS_createPath", !0), P("FS_createDataFile", !0), P("FS_createPreloadedFile", !0), P("FS_createLazyFile", !0), P("FS_createLink", !1), P("FS_createDevice", !0), P("FS_unlink", !0), P("getLEB", !1), P("getFunctionTables", !1), P("alignFunctionTables", !1), P("registerFunctions", !1), P("addFunction", !1), P("removeFunction", !1), P("prettyPrint", !1), P("dynCall", !1), P("getCompilerSetting", !1), P("print", !1), P("printErr", !1), P("getTempRet0", !1), P("setTempRet0", !1), P("callMain", !1), P("abort", !1), P("keepRuntimeAlive", !1), P("ptrToString", !1), P("zeroMemory", !1), P("stringToNewUTF8", !1), P("emscripten_realloc_buffer", !1), P("ENV", !1), P("ERRNO_CODES", !1), P("ERRNO_MESSAGES", !1), P("setErrNo", !1), P("inetPton4", !1), P("inetNtop4", !1), P("inetPton6", !1), P("inetNtop6", !1), P("readSockaddr", !1), P("writeSockaddr", !1), P("DNS", !1), P("getHostByName", !1), P("Protocols", !1), P("Sockets", !1), P("getRandomDevice", !1), P("traverseStack", !1), P("UNWIND_CACHE", !1), P("convertPCtoSourceLocation", !1), P("readAsmConstArgsArray", !1), P("readAsmConstArgs", !1), P("mainThreadEM_ASM", !1), P("jstoi_q", !1), P("jstoi_s", !1), P("getExecutableName", !1), P("listenOnce", !1), P("autoResumeAudioContext", !1), P("dynCallLegacy", !1), P("getDynCaller", !1), P("dynCall", !1), P("setWasmTableEntry", !1), P("getWasmTableEntry", !1), P("handleException", !1), P("runtimeKeepalivePush", !1), P("runtimeKeepalivePop", !1), P("callUserCallback", !1), P("maybeExit", !1), P("safeSetTimeout", !1), P("asmjsMangle", !1), P("asyncLoad", !1), P("alignMemory", !1), P("mmapAlloc", !1), P("reallyNegative", !1), P("unSign", !1), P("reSign", !1), P("formatString", !1), P("PATH", !1), P("PATH_FS", !1), P("SYSCALLS", !1), P("getSocketFromFD", !1), P("getSocketAddress", !1), P("JSEvents", !1), P("registerKeyEventCallback", !1), P("specialHTMLTargets", !1), P("maybeCStringToJsString", !1), P("findEventTarget", !1), P("findCanvasEventTarget", !1), P("getBoundingClientRect", !1), P("fillMouseEventData", !1), P("registerMouseEventCallback", !1), P("registerWheelEventCallback", !1), P("registerUiEventCallback", !1), P("registerFocusEventCallback", !1), P("fillDeviceOrientationEventData", !1), P("registerDeviceOrientationEventCallback", !1), P("fillDeviceMotionEventData", !1), P("registerDeviceMotionEventCallback", !1), P("screenOrientation", !1), P("fillOrientationChangeEventData", !1), P("registerOrientationChangeEventCallback", !1), P("fillFullscreenChangeEventData", !1), P("registerFullscreenChangeEventCallback", !1), P("registerRestoreOldStyle", !1), P("hideEverythingExceptGivenElement", !1), P("restoreHiddenElements", !1), P("setLetterbox", !1), P("currentFullscreenStrategy", !1), P("restoreOldWindowedStyle", !1), P("softFullscreenResizeWebGLRenderTarget", !1), P("doRequestFullscreen", !1), P("fillPointerlockChangeEventData", !1), P("registerPointerlockChangeEventCallback", !1), P("registerPointerlockErrorEventCallback", !1), P("requestPointerLock", !1), P("fillVisibilityChangeEventData", !1), P("registerVisibilityChangeEventCallback", !1), P("registerTouchEventCallback", !1), P("fillGamepadEventData", !1), P("registerGamepadEventCallback", !1), P("registerBeforeUnloadEventCallback", !1), P("fillBatteryEventData", !1), P("battery", !1), P("registerBatteryEventCallback", !1), P("setCanvasElementSize", !1), P("getCanvasElementSize", !1), P("demangle", !1), P("demangleAll", !1), P("jsStackTrace", !1), P("stackTrace", !1), P("getEnvStrings", !1), P("checkWasiClock", !1), P("writeI53ToI64", !1), P("writeI53ToI64Clamped", !1), P("writeI53ToI64Signaling", !1), P("writeI53ToU64Clamped", !1), P("writeI53ToU64Signaling", !1), P("readI53FromI64", !1), P("readI53FromU64", !1), P("convertI32PairToI53", !1), P("convertU32PairToI53", !1), P("dlopenMissingError", !1), P("setImmediateWrapped", !1), P("clearImmediateWrapped", !1), P("polyfillSetImmediate", !1), P("uncaughtExceptionCount", !1), P("exceptionLast", !1), P("exceptionCaught", !1), P("ExceptionInfo", !1), P("exception_addRef", !1), P("exception_decRef", !1), P("Browser", !1), P("setMainLoop", !1), P("wget", !1), P("FS", !1), P("MEMFS", !1), P("TTY", !1), P("PIPEFS", !1), P("SOCKFS", !1), P("_setNetworkCallback", !1), P("tempFixedLengthArray", !1), P("miniTempWebGLFloatBuffers", !1), P("heapObjectForWebGLType", !1), P("heapAccessShiftForWebGLHeap", !1), P("GL", !1), P("emscriptenWebGLGet", !1), P("computeUnpackAlignedImageSize", !1), P("emscriptenWebGLGetTexPixelData", !1), P("emscriptenWebGLGetUniform", !1), P("webglGetUniformLocation", !1), P("webglPrepareUniformLocationsBeforeFirstUse", !1), P("webglGetLeftBracePos", !1), P("emscriptenWebGLGetVertexAttrib", !1), P("writeGLArray", !1), P("AL", !1), P("SDL_unicode", !1), P("SDL_ttfContext", !1), P("SDL_audio", !1), P("SDL", !1), P("SDL_gfx", !1), P("GLUT", !1), P("EGL", !1), P("GLFW_Window", !1), P("GLFW", !1), P("GLEW", !1), P("IDBStore", !1), P("runAndAbortIfError", !1), P("InternalError", !1), P("BindingError", !1), P("UnboundTypeError", !1), P("PureVirtualError", !1), P("init_embind", !1), P("throwInternalError", !1), P("throwBindingError", !1), P("throwUnboundTypeError", !1), P("ensureOverloadTable", !1), P("exposePublicSymbol", !1), P("replacePublicSymbol", !1), P("extendError", !1), P("createNamedFunction", !1), P("registeredInstances", !1), P("getBasestPointer", !1), P("registerInheritedInstance", !1), P("unregisterInheritedInstance", !1), P("getInheritedInstance", !1), P("getInheritedInstanceCount", !1), P("getLiveInheritedInstances", !1), P("registeredTypes", !1), P("awaitingDependencies", !1), P("typeDependencies", !1), P("registeredPointers", !1), P("registerType", !1), P("whenDependentTypesAreResolved", !1), P("embind_charCodes", !1), P("embind_init_charCodes", !1), P("readLatin1String", !1), P("getTypeName", !1), P("heap32VectorToArray", !1), P("requireRegisteredType", !1), P("getShiftFromSize", !1), P("integerReadValueFromPointer", !1), P("enumReadValueFromPointer", !1), P("floatReadValueFromPointer", !1), P("simpleReadValueFromPointer", !1), P("runDestructors", !1), P("new_", !1), P("craftInvokerFunction", !1), P("embind__requireFunction", !1), P("tupleRegistrations", !1), P("structRegistrations", !1), P("genericPointerToWireType", !1), P("constNoSmartPtrRawPointerToWireType", !1), P("nonConstNoSmartPtrRawPointerToWireType", !1), P("init_RegisteredPointer", !1), P("RegisteredPointer", !1), P("RegisteredPointer_getPointee", !1), P("RegisteredPointer_destructor", !1), P("RegisteredPointer_deleteObject", !1), P("RegisteredPointer_fromWireType", !1), P("runDestructor", !1), P("releaseClassHandle", !1), P("finalizationRegistry", !1), P("detachFinalizer_deps", !1), P("detachFinalizer", !1), P("attachFinalizer", !1), P("makeClassHandle", !1), P("init_ClassHandle", !1), P("ClassHandle", !1), P("ClassHandle_isAliasOf", !1), P("throwInstanceAlreadyDeleted", !1), P("ClassHandle_clone", !1), P("ClassHandle_delete", !1), P("deletionQueue", !1), P("ClassHandle_isDeleted", !1), P("ClassHandle_deleteLater", !1), P("flushPendingDeletes", !1), P("delayFunction", !1), P("setDelayFunction", !1), P("RegisteredClass", !1), P("shallowCopyInternalPointer", !1), P("downcastPointer", !1), P("upcastPointer", !1), P("validateThis", !1), P("char_0", !1), P("char_9", !1), P("makeLegalFunctionName", !1), P("emval_handle_array", !1), P("emval_free_list", !1), P("emval_symbols", !1), P("init_emval", !1), P("count_emval_handles", !1), P("get_first_emval", !1), P("getStringOrSymbol", !1), P("Emval", !1), P("emval_newers", !1), P("craftEmvalAllocator", !1), P("emval_get_global", !1), P("emval_methodCallers", !1), P("emval_registeredMethods", !1), P("warnOnce", !1), P("stackSave", !1), P("stackRestore", !1), P("stackAlloc", !1), P("AsciiToString", !1), P("stringToAscii", !1), P("UTF16ToString", !1), P("stringToUTF16", !1), P("lengthBytesUTF16", !1), P("UTF32ToString", !1), P("stringToUTF32", !1), P("lengthBytesUTF32", !1), P("allocateUTF8", !1), P("allocateUTF8OnStack", !1), r.writeStackCookie = ne, r.checkStackCookie = oe, C("ALLOC_NORMAL", !1), C("ALLOC_STACK", !1), de = function e() {
|
|
3460
|
+
Tt || Ct(), Tt || (de = e);
|
|
3461
|
+
}, r.run = Ct, r.preInit) for ("function" == typeof r.preInit && (r.preInit = [r.preInit]); r.preInit.length > 0;) r.preInit.pop()();
|
|
3462
|
+
Ct(), e.exports = r;
|
|
3463
|
+
});
|
|
3464
|
+
var u = 1e3,
|
|
3465
|
+
c = 1e3,
|
|
3466
|
+
d = !1,
|
|
3467
|
+
f = !1,
|
|
3468
|
+
p = !1,
|
|
3469
|
+
m = !1,
|
|
3470
|
+
h = "initVideo",
|
|
3471
|
+
g = "render",
|
|
3472
|
+
v = "playAudio",
|
|
3473
|
+
y = "initAudio",
|
|
3474
|
+
E = "audioCode",
|
|
3475
|
+
w = "videoCode",
|
|
3476
|
+
b = 1,
|
|
3477
|
+
_ = 2,
|
|
3478
|
+
T = "init",
|
|
3479
|
+
k = "decode",
|
|
3480
|
+
S = "audioDecode",
|
|
3481
|
+
C = "videoDecode",
|
|
3482
|
+
P = "close",
|
|
3483
|
+
A = "updateConfig",
|
|
3484
|
+
F = "key",
|
|
3485
|
+
D = "delta";
|
|
3486
|
+
s(function (e) {
|
|
3487
|
+
!function () {
|
|
3488
|
+
var r = "undefined" != typeof window && void 0 !== window.document ? window.document : {},
|
|
3489
|
+
t = e.exports,
|
|
3490
|
+
n = function () {
|
|
3491
|
+
for (var e, t = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]], n = 0, o = t.length, i = {}; n < o; n++) if ((e = t[n]) && e[1] in r) {
|
|
3492
|
+
for (n = 0; n < e.length; n++) i[t[0][n]] = e[n];
|
|
3493
|
+
return i;
|
|
3494
|
+
}
|
|
3495
|
+
return !1;
|
|
3496
|
+
}(),
|
|
3497
|
+
o = {
|
|
3498
|
+
change: n.fullscreenchange,
|
|
3499
|
+
error: n.fullscreenerror
|
|
3500
|
+
},
|
|
3501
|
+
i = {
|
|
3502
|
+
request: function request(e, t) {
|
|
3503
|
+
return new Promise(function (o, i) {
|
|
3504
|
+
var a = function () {
|
|
3505
|
+
this.off("change", a), o();
|
|
3506
|
+
}.bind(this);
|
|
3507
|
+
this.on("change", a);
|
|
3508
|
+
var s = (e = e || r.documentElement)[n.requestFullscreen](t);
|
|
3509
|
+
s instanceof Promise && s.then(a).catch(i);
|
|
3510
|
+
}.bind(this));
|
|
3511
|
+
},
|
|
3512
|
+
exit: function exit() {
|
|
3513
|
+
return new Promise(function (e, t) {
|
|
3514
|
+
if (this.isFullscreen) {
|
|
3515
|
+
var o = function () {
|
|
3516
|
+
this.off("change", o), e();
|
|
3517
|
+
}.bind(this);
|
|
3518
|
+
this.on("change", o);
|
|
3519
|
+
var i = r[n.exitFullscreen]();
|
|
3520
|
+
i instanceof Promise && i.then(o).catch(t);
|
|
3521
|
+
} else e();
|
|
3522
|
+
}.bind(this));
|
|
3523
|
+
},
|
|
3524
|
+
toggle: function toggle(e, r) {
|
|
3525
|
+
return this.isFullscreen ? this.exit() : this.request(e, r);
|
|
3526
|
+
},
|
|
3527
|
+
onchange: function onchange(e) {
|
|
3528
|
+
this.on("change", e);
|
|
3529
|
+
},
|
|
3530
|
+
onerror: function onerror(e) {
|
|
3531
|
+
this.on("error", e);
|
|
3532
|
+
},
|
|
3533
|
+
on: function on(e, t) {
|
|
3534
|
+
var n = o[e];
|
|
3535
|
+
n && r.addEventListener(n, t, !1);
|
|
3536
|
+
},
|
|
3537
|
+
off: function off(e, t) {
|
|
3538
|
+
var n = o[e];
|
|
3539
|
+
n && r.removeEventListener(n, t, !1);
|
|
3540
|
+
},
|
|
3541
|
+
raw: n
|
|
3542
|
+
};
|
|
3543
|
+
n ? (Object.defineProperties(i, {
|
|
3544
|
+
isFullscreen: {
|
|
3545
|
+
get: function get() {
|
|
3546
|
+
return Boolean(r[n.fullscreenElement]);
|
|
3547
|
+
}
|
|
3548
|
+
},
|
|
3549
|
+
element: {
|
|
3550
|
+
enumerable: !0,
|
|
3551
|
+
get: function get() {
|
|
3552
|
+
return r[n.fullscreenElement];
|
|
3553
|
+
}
|
|
3554
|
+
},
|
|
3555
|
+
isEnabled: {
|
|
3556
|
+
enumerable: !0,
|
|
3557
|
+
get: function get() {
|
|
3558
|
+
return Boolean(r[n.fullscreenEnabled]);
|
|
3559
|
+
}
|
|
3560
|
+
}
|
|
3561
|
+
}), t ? e.exports = i : window.screenfull = i) : t ? e.exports = {
|
|
3562
|
+
isEnabled: !1
|
|
3563
|
+
} : window.screenfull = {
|
|
3564
|
+
isEnabled: !1
|
|
3565
|
+
};
|
|
3566
|
+
}();
|
|
3567
|
+
}).isEnabled, function () {
|
|
3568
|
+
try {
|
|
3569
|
+
if ("object" == (typeof WebAssembly === "undefined" ? "undefined" : _typeof(WebAssembly)) && "function" == typeof WebAssembly.instantiate) {
|
|
3570
|
+
var _e2 = new WebAssembly.Module(Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0));
|
|
3571
|
+
if (_e2 instanceof WebAssembly.Module) return new WebAssembly.Instance(_e2) instanceof WebAssembly.Instance;
|
|
3572
|
+
}
|
|
3573
|
+
} catch (e) {}
|
|
3574
|
+
}(), Date.now || (Date.now = function () {
|
|
3575
|
+
return new Date().getTime();
|
|
3576
|
+
}), l.postRun = function () {
|
|
3577
|
+
var e = [],
|
|
3578
|
+
r = [],
|
|
3579
|
+
t = {};
|
|
3580
|
+
"VideoEncoder" in self && (t = {
|
|
3581
|
+
hasInit: !1,
|
|
3582
|
+
isEmitInfo: !1,
|
|
3583
|
+
offscreenCanvas: null,
|
|
3584
|
+
offscreenCanvasCtx: null,
|
|
3585
|
+
decoder: new VideoDecoder({
|
|
3586
|
+
output: function output(e) {
|
|
3587
|
+
t.isEmitInfo || (n.opt.debug && console.log("Jessibuca: [worker] Webcodecs Video Decoder initSize"), postMessage({
|
|
3588
|
+
cmd: h,
|
|
3589
|
+
w: e.codedWidth,
|
|
3590
|
+
h: e.codedHeight
|
|
3591
|
+
}), t.isEmitInfo = !0, t.offscreenCanvas = new OffscreenCanvas(e.codedWidth, e.codedHeight), t.offscreenCanvasCtx = t.offscreenCanvas.getContext("2d")), t.offscreenCanvasCtx.drawImage(e, 0, 0, e.codedWidth, e.codedHeight);
|
|
3592
|
+
var r = t.offscreenCanvas.transferToImageBitmap();
|
|
3593
|
+
postMessage({
|
|
3594
|
+
cmd: g,
|
|
3595
|
+
buffer: r,
|
|
3596
|
+
delay: n.delay,
|
|
3597
|
+
ts: 0
|
|
3598
|
+
}, [r]), setTimeout(function () {
|
|
3599
|
+
e.close ? e.close() : e.destroy();
|
|
3600
|
+
}, 100);
|
|
3601
|
+
},
|
|
3602
|
+
error: function error(e) {
|
|
3603
|
+
console.error(e);
|
|
3604
|
+
}
|
|
3605
|
+
}),
|
|
3606
|
+
decode: function decode(e, r) {
|
|
3607
|
+
var o = e[0] >> 4 == 1;
|
|
3608
|
+
if (t.hasInit) {
|
|
3609
|
+
var _n = new EncodedVideoChunk({
|
|
3610
|
+
data: e.slice(5),
|
|
3611
|
+
timestamp: r,
|
|
3612
|
+
type: o ? F : D
|
|
3613
|
+
});
|
|
3614
|
+
t.decoder.decode(_n);
|
|
3615
|
+
} else if (o && 0 === e[1]) {
|
|
3616
|
+
var _r2 = 15 & e[0];
|
|
3617
|
+
n.setVideoCodec(_r2);
|
|
3618
|
+
var _o = function (e) {
|
|
3619
|
+
var r = e.subarray(1, 4),
|
|
3620
|
+
t = "avc1.";
|
|
3621
|
+
for (var _e3 = 0; _e3 < 3; _e3++) {
|
|
3622
|
+
var _n2 = r[_e3].toString(16);
|
|
3623
|
+
_n2.length < 2 && (_n2 = "0" + _n2), t += _n2;
|
|
3624
|
+
}
|
|
3625
|
+
return {
|
|
3626
|
+
codec: t,
|
|
3627
|
+
description: e
|
|
3628
|
+
};
|
|
3629
|
+
}(e.slice(5));
|
|
3630
|
+
t.decoder.configure(_o), t.hasInit = !0;
|
|
3631
|
+
}
|
|
3632
|
+
},
|
|
3633
|
+
reset: function reset() {
|
|
3634
|
+
t.hasInit = !1, t.isEmitInfo = !1, t.offscreenCanvas = null, t.offscreenCanvasCtx = null;
|
|
3635
|
+
}
|
|
3636
|
+
});
|
|
3637
|
+
var n = {
|
|
3638
|
+
opt: {
|
|
3639
|
+
debug: d,
|
|
3640
|
+
useOffscreen: p,
|
|
3641
|
+
useWCS: f,
|
|
3642
|
+
videoBuffer: u,
|
|
3643
|
+
openWebglAlignment: m,
|
|
3644
|
+
videoBufferDelay: c
|
|
3645
|
+
},
|
|
3646
|
+
useOffscreen: function useOffscreen() {
|
|
3647
|
+
return n.opt.useOffscreen && "undefined" != typeof OffscreenCanvas;
|
|
3648
|
+
},
|
|
3649
|
+
initAudioPlanar: function initAudioPlanar(e, t) {
|
|
3650
|
+
postMessage({
|
|
3651
|
+
cmd: y,
|
|
3652
|
+
sampleRate: t,
|
|
3653
|
+
channels: e
|
|
3654
|
+
});
|
|
3655
|
+
var n = [],
|
|
3656
|
+
o = 0;
|
|
3657
|
+
this.playAudioPlanar = function (t, i, a) {
|
|
3658
|
+
for (var s = i, u = [], c = 0, d = 0; d < 2; d++) {
|
|
3659
|
+
var f = l.HEAPU32[(t >> 2) + d] >> 2;
|
|
3660
|
+
u[d] = l.HEAPF32.subarray(f, f + s);
|
|
3661
|
+
}
|
|
3662
|
+
if (o) {
|
|
3663
|
+
if (!(s >= (i = 1024 - o))) return o += s, r[0] = Float32Array.of.apply(Float32Array, _toConsumableArray(r[0]).concat(_toConsumableArray(u[0]))), void (2 == e && (r[1] = Float32Array.of.apply(Float32Array, _toConsumableArray(r[1]).concat(_toConsumableArray(u[1])))));
|
|
3664
|
+
n[0] = Float32Array.of.apply(Float32Array, _toConsumableArray(r[0]).concat(_toConsumableArray(u[0].subarray(0, i)))), 2 == e && (n[1] = Float32Array.of.apply(Float32Array, _toConsumableArray(r[1]).concat(_toConsumableArray(u[1].subarray(0, i))))), postMessage({
|
|
3665
|
+
cmd: v,
|
|
3666
|
+
buffer: n,
|
|
3667
|
+
ts: a
|
|
3668
|
+
}, n.map(function (e) {
|
|
3669
|
+
return e.buffer;
|
|
3670
|
+
})), c = i, s -= i;
|
|
3671
|
+
}
|
|
3672
|
+
for (o = s; o >= 1024; o -= 1024) n[0] = u[0].slice(c, c += 1024), 2 == e && (n[1] = u[1].slice(c - 1024, c)), postMessage({
|
|
3673
|
+
cmd: v,
|
|
3674
|
+
buffer: n,
|
|
3675
|
+
ts: a
|
|
3676
|
+
}, n.map(function (e) {
|
|
3677
|
+
return e.buffer;
|
|
3678
|
+
}));
|
|
3679
|
+
o && (r[0] = u[0].slice(c), 2 == e && (r[1] = u[1].slice(c)));
|
|
3680
|
+
};
|
|
3681
|
+
},
|
|
3682
|
+
setVideoCodec: function setVideoCodec(e) {
|
|
3683
|
+
postMessage({
|
|
3684
|
+
cmd: w,
|
|
3685
|
+
code: e
|
|
3686
|
+
});
|
|
3687
|
+
},
|
|
3688
|
+
setAudioCodec: function setAudioCodec(e) {
|
|
3689
|
+
postMessage({
|
|
3690
|
+
cmd: E,
|
|
3691
|
+
code: e
|
|
3692
|
+
});
|
|
3693
|
+
},
|
|
3694
|
+
setVideoSize: function setVideoSize(e, r) {
|
|
3695
|
+
postMessage({
|
|
3696
|
+
cmd: h,
|
|
3697
|
+
w: e,
|
|
3698
|
+
h: r
|
|
3699
|
+
});
|
|
3700
|
+
var t = e * r,
|
|
3701
|
+
o = t >> 2;
|
|
3702
|
+
n.useOffscreen() ? (this.offscreenCanvas = new OffscreenCanvas(e, r), this.offscreenCanvasGL = this.offscreenCanvas.getContext("webgl"), this.webglObj = function (e, r) {
|
|
3703
|
+
var t = ["attribute vec4 vertexPos;", "attribute vec4 texturePos;", "varying vec2 textureCoord;", "void main()", "{", "gl_Position = vertexPos;", "textureCoord = texturePos.xy;", "}"].join("\n"),
|
|
3704
|
+
n = ["precision highp float;", "varying highp vec2 textureCoord;", "uniform sampler2D ySampler;", "uniform sampler2D uSampler;", "uniform sampler2D vSampler;", "const mat4 YUV2RGB = mat4", "(", "1.1643828125, 0, 1.59602734375, -.87078515625,", "1.1643828125, -.39176171875, -.81296875, .52959375,", "1.1643828125, 2.017234375, 0, -1.081390625,", "0, 0, 0, 1", ");", "void main(void) {", "highp float y = texture2D(ySampler, textureCoord).r;", "highp float u = texture2D(uSampler, textureCoord).r;", "highp float v = texture2D(vSampler, textureCoord).r;", "gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;", "}"].join("\n");
|
|
3705
|
+
r && e.pixelStorei(e.UNPACK_ALIGNMENT, 1);
|
|
3706
|
+
var o = e.createShader(e.VERTEX_SHADER);
|
|
3707
|
+
e.shaderSource(o, t), e.compileShader(o), e.getShaderParameter(o, e.COMPILE_STATUS) || console.log("Vertex shader failed to compile: " + e.getShaderInfoLog(o));
|
|
3708
|
+
var i = e.createShader(e.FRAGMENT_SHADER);
|
|
3709
|
+
e.shaderSource(i, n), e.compileShader(i), e.getShaderParameter(i, e.COMPILE_STATUS) || console.log("Fragment shader failed to compile: " + e.getShaderInfoLog(i));
|
|
3710
|
+
var a = e.createProgram();
|
|
3711
|
+
e.attachShader(a, o), e.attachShader(a, i), e.linkProgram(a), e.getProgramParameter(a, e.LINK_STATUS) || console.log("Program failed to compile: " + e.getProgramInfoLog(a)), e.useProgram(a);
|
|
3712
|
+
var s = e.createBuffer();
|
|
3713
|
+
e.bindBuffer(e.ARRAY_BUFFER, s), e.bufferData(e.ARRAY_BUFFER, new Float32Array([1, 1, -1, 1, 1, -1, -1, -1]), e.STATIC_DRAW);
|
|
3714
|
+
var l = e.getAttribLocation(a, "vertexPos");
|
|
3715
|
+
e.enableVertexAttribArray(l), e.vertexAttribPointer(l, 2, e.FLOAT, !1, 0, 0);
|
|
3716
|
+
var u = e.createBuffer();
|
|
3717
|
+
e.bindBuffer(e.ARRAY_BUFFER, u), e.bufferData(e.ARRAY_BUFFER, new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]), e.STATIC_DRAW);
|
|
3718
|
+
var c = e.getAttribLocation(a, "texturePos");
|
|
3719
|
+
function d(r, t) {
|
|
3720
|
+
var n = e.createTexture();
|
|
3721
|
+
return e.bindTexture(e.TEXTURE_2D, n), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.bindTexture(e.TEXTURE_2D, null), e.uniform1i(e.getUniformLocation(a, r), t), n;
|
|
3722
|
+
}
|
|
3723
|
+
e.enableVertexAttribArray(c), e.vertexAttribPointer(c, 2, e.FLOAT, !1, 0, 0);
|
|
3724
|
+
var f = d("ySampler", 0),
|
|
3725
|
+
p = d("uSampler", 1),
|
|
3726
|
+
m = d("vSampler", 2);
|
|
3727
|
+
return {
|
|
3728
|
+
render: function render(r, t, n, o, i) {
|
|
3729
|
+
e.viewport(0, 0, r, t), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, f), e.texImage2D(e.TEXTURE_2D, 0, e.LUMINANCE, r, t, 0, e.LUMINANCE, e.UNSIGNED_BYTE, n), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, p), e.texImage2D(e.TEXTURE_2D, 0, e.LUMINANCE, r / 2, t / 2, 0, e.LUMINANCE, e.UNSIGNED_BYTE, o), e.activeTexture(e.TEXTURE2), e.bindTexture(e.TEXTURE_2D, m), e.texImage2D(e.TEXTURE_2D, 0, e.LUMINANCE, r / 2, t / 2, 0, e.LUMINANCE, e.UNSIGNED_BYTE, i), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
|
|
3730
|
+
},
|
|
3731
|
+
destroy: function destroy() {
|
|
3732
|
+
try {
|
|
3733
|
+
e.deleteProgram(a), e.deleteBuffer(s), e.deleteBuffer(u), e.deleteTexture(f), e.deleteTexture(p), e.deleteTexture(m);
|
|
3734
|
+
} catch (e) {}
|
|
3735
|
+
}
|
|
3736
|
+
};
|
|
3737
|
+
}(this.offscreenCanvasGL, n.opt.openWebglAlignment), this.draw = function (n, i, a, s) {
|
|
3738
|
+
var u = l.HEAPU8.subarray(i, i + t),
|
|
3739
|
+
c = l.HEAPU8.subarray(a, a + o),
|
|
3740
|
+
d = l.HEAPU8.subarray(s, s + o);
|
|
3741
|
+
this.webglObj.render(e, r, u, c, d);
|
|
3742
|
+
var f = this.offscreenCanvas.transferToImageBitmap();
|
|
3743
|
+
postMessage({
|
|
3744
|
+
cmd: g,
|
|
3745
|
+
buffer: f,
|
|
3746
|
+
delay: this.delay,
|
|
3747
|
+
ts: n
|
|
3748
|
+
}, [f]);
|
|
3749
|
+
}) : this.draw = function (e, r, n, i) {
|
|
3750
|
+
var a = [Uint8Array.from(l.HEAPU8.subarray(r, r + t)), Uint8Array.from(l.HEAPU8.subarray(n, n + o)), Uint8Array.from(l.HEAPU8.subarray(i, i + o))];
|
|
3751
|
+
postMessage({
|
|
3752
|
+
cmd: g,
|
|
3753
|
+
output: a,
|
|
3754
|
+
delay: this.delay,
|
|
3755
|
+
ts: e
|
|
3756
|
+
}, a.map(function (e) {
|
|
3757
|
+
return e.buffer;
|
|
3758
|
+
}));
|
|
3759
|
+
};
|
|
3760
|
+
},
|
|
3761
|
+
getDelay: function getDelay(e) {
|
|
3762
|
+
if (!e) return -1;
|
|
3763
|
+
if (this.firstTimestamp) {
|
|
3764
|
+
if (e) {
|
|
3765
|
+
var _r3 = Date.now() - this.startTimestamp,
|
|
3766
|
+
_t2 = e - this.firstTimestamp;
|
|
3767
|
+
this.delay = _r3 >= _t2 ? _r3 - _t2 : _t2 - _r3;
|
|
3768
|
+
}
|
|
3769
|
+
} else this.firstTimestamp = e, this.startTimestamp = Date.now(), this.delay = -1;
|
|
3770
|
+
return this.delay;
|
|
3771
|
+
},
|
|
3772
|
+
resetDelay: function resetDelay() {
|
|
3773
|
+
this.firstTimestamp = null, this.startTimestamp = null, this.delay = -1;
|
|
3774
|
+
},
|
|
3775
|
+
init: function init() {
|
|
3776
|
+
var _this = this;
|
|
3777
|
+
n.opt.debug && console.log("Jessibuca: [worker] init");
|
|
3778
|
+
var r = function r(e) {
|
|
3779
|
+
n.opt.useWCS && n.useOffscreen() && e.type === _ && t.decode ? t.decode(e.payload, e.ts) : e.decoder.decode(e.payload, e.ts);
|
|
3780
|
+
};
|
|
3781
|
+
this.stopId = setInterval(function () {
|
|
3782
|
+
if (e.length) if (_this.dropping) {
|
|
3783
|
+
for ((t = e.shift()).type === b && 0 === t.payload[1] && r(t); !t.isIFrame && e.length;) (t = e.shift()).type === b && 0 === t.payload[1] && r(t);
|
|
3784
|
+
t.isIFrame && (_this.dropping = !1, r(t));
|
|
3785
|
+
} else {
|
|
3786
|
+
var t = e[0];
|
|
3787
|
+
if (-1 === _this.getDelay(t.ts)) e.shift(), r(t);else if (_this.delay > n.opt.videoBuffer + n.opt.videoBufferDelay) _this.resetDelay(), _this.dropping = !0;else for (; e.length && (t = e[0], _this.getDelay(t.ts) > n.opt.videoBuffer);) e.shift(), r(t);
|
|
3788
|
+
}
|
|
3789
|
+
}, 10);
|
|
3790
|
+
},
|
|
3791
|
+
close: function close() {
|
|
3792
|
+
n.opt.debug && console.log("Jessibuca: [worker]: close"), clearInterval(this.stopId), this.stopId = null, o.clear && o.clear(), i.clear && i.clear(), t.reset && t.reset(), this.firstTimestamp = null, this.startTimestamp = null, this.delay = -1, this.dropping = !1, this.webglObj && (this.webglObj.destroy(), this.offscreenCanvas = null, this.offscreenCanvasGL = null, this.offscreenCanvasCtx = null), e = [], r = [], delete this.playAudioPlanar, delete this.draw;
|
|
3793
|
+
},
|
|
3794
|
+
pushBuffer: function pushBuffer(r, t) {
|
|
3795
|
+
t.type === b ? e.push({
|
|
3796
|
+
ts: t.ts,
|
|
3797
|
+
payload: r,
|
|
3798
|
+
decoder: o,
|
|
3799
|
+
type: b
|
|
3800
|
+
}) : t.type === _ && e.push({
|
|
3801
|
+
ts: t.ts,
|
|
3802
|
+
payload: r,
|
|
3803
|
+
decoder: i,
|
|
3804
|
+
type: _,
|
|
3805
|
+
isIFrame: t.isIFrame
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3808
|
+
},
|
|
3809
|
+
o = new l.AudioDecoder(n),
|
|
3810
|
+
i = new l.VideoDecoder(n);
|
|
3811
|
+
postMessage({
|
|
3812
|
+
cmd: T
|
|
3813
|
+
}), self.onmessage = function (e) {
|
|
3814
|
+
var r = e.data;
|
|
3815
|
+
switch (r.cmd) {
|
|
3816
|
+
case T:
|
|
3817
|
+
try {
|
|
3818
|
+
n.opt = Object.assign(n.opt, JSON.parse(r.opt));
|
|
3819
|
+
} catch (e) {}
|
|
3820
|
+
o.sample_rate = r.sampleRate, n.init();
|
|
3821
|
+
break;
|
|
3822
|
+
case k:
|
|
3823
|
+
n.pushBuffer(r.buffer, r.options);
|
|
3824
|
+
break;
|
|
3825
|
+
case S:
|
|
3826
|
+
o.decode(r.buffer, r.ts);
|
|
3827
|
+
break;
|
|
3828
|
+
case C:
|
|
3829
|
+
i.decode(r.buffer, r.ts);
|
|
3830
|
+
break;
|
|
3831
|
+
case P:
|
|
3832
|
+
n.close();
|
|
3833
|
+
break;
|
|
3834
|
+
case A:
|
|
3835
|
+
n.opt[r.key] = r.value;
|
|
3836
|
+
}
|
|
3837
|
+
};
|
|
3838
|
+
};
|
|
3839
|
+
});
|