From 810c12418c8e28d4dec503d89b34986ce1a1135d Mon Sep 17 00:00:00 2001 From: xuyunshi <405029644@qq.com> Date: Thu, 16 Nov 2023 10:49:41 +0800 Subject: [PATCH] Update bridge resource --- Example/Podfile.lock | 10 +++++----- Whiteboard/Resource/{2d0e463 => 30ccd81} | 0 Whiteboard/Resource/index.html | 2 +- .../Resource/{main.f07dc043.js => main.4bd44f3e.js} | 2 +- carrot.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename Whiteboard/Resource/{2d0e463 => 30ccd81} (100%) rename Whiteboard/Resource/{main.f07dc043.js => main.4bd44f3e.js} (63%) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 650ffe48..e73a468f 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -4,10 +4,10 @@ PODS: - NTLBridge (3.1.6) - SSZipArchive (2.4.3) - White_YYModel (1.0.5) - - Whiteboard (2.16.77): - - Whiteboard/Whiteboard-Basic (= 2.16.77) - - Whiteboard/Resource (2.16.77) - - Whiteboard/Whiteboard-Basic (2.16.77): + - Whiteboard (2.16.76): + - Whiteboard/Whiteboard-Basic (= 2.16.76) + - Whiteboard/Resource (2.16.76) + - Whiteboard/Whiteboard-Basic (2.16.76): - NTLBridge (~> 3.1.4) - White_YYModel - Whiteboard/Resource @@ -36,7 +36,7 @@ SPEC CHECKSUMS: NTLBridge: 6ef7f3c1fc956f2e2d701a89828d51674bd479c7 SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef White_YYModel: b71cacc651398e636fa872d625d3f59713ce3715 - Whiteboard: 82fc4ad71d8ff007ae23b3e36c779635cfd9c49f + Whiteboard: 8496ad620b73b66016642c4efe1b439ddf6f642d PODFILE CHECKSUM: 95aae5767e3ee1197fa3ca543ca2900d16bd9399 diff --git a/Whiteboard/Resource/2d0e463 b/Whiteboard/Resource/30ccd81 similarity index 100% rename from Whiteboard/Resource/2d0e463 rename to Whiteboard/Resource/30ccd81 diff --git a/Whiteboard/Resource/index.html b/Whiteboard/Resource/index.html index 8987577f..0b3e9c79 100644 --- a/Whiteboard/Resource/index.html +++ b/Whiteboard/Resource/index.html @@ -1 +1 @@ -white-sdk-bridge Application
\ No newline at end of file +white-sdk-bridge Application
\ No newline at end of file diff --git a/Whiteboard/Resource/main.f07dc043.js b/Whiteboard/Resource/main.4bd44f3e.js similarity index 63% rename from Whiteboard/Resource/main.f07dc043.js rename to Whiteboard/Resource/main.4bd44f3e.js index 65b77f93..ba82ef56 100644 --- a/Whiteboard/Resource/main.f07dc043.js +++ b/Whiteboard/Resource/main.4bd44f3e.js @@ -1 +1 @@ -(self.webpackChunkwhiteboard_bridge=self.webpackChunkwhiteboard_bridge||[]).push([[179],{80782:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=80782,e.exports=t},89734:function(e,t,n){"use strict";n.r(t)},6167:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,o.useEffect)((function(){return function(){window.removeEventListener("error",a.globalErrorEvent),window.removeEventListener("message",a.postCustomMessage)}}),[]),window.addEventListener("error",a.globalErrorEvent),window.addEventListener("message",a.postCustomMessage);var e=(0,o.useRef)(null);return(0,i.setWhiteboardDivGetter)((function(){return e.current})),o.default.createElement("div",{id:c,ref:e,style:{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:1}})},t.whiteboardContainerId=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(17328)),a=n(28388),i=n(5294);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}n(19418),n(89734),n(75735);var c="whiteboard-container";t.whiteboardContainerId=c},24433:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDebugFunctions=function(){window.testRoom=function(){(0,r.enableReport)(!0);var e={log:!0,userCursor:!0,__platform:"bridge",appIdentifier:"",useMultiViews:!0};window.newWhiteSdk(e,(function(){}));var t={uuid:"",uid:"0",roomToken:"",windowParams:{containerSizeRatio:3/4,fullscreen:!1},userPayload:{avatar:"https://white-pan.oss-cn-shanghai.aliyuncs.com/40/image/mask.jpg"}};window.joinRoom(t,(function(){window.bridgeRoom=window.bridge.registerMap.async.room}))},window.testReplay=function(){(0,r.enableReport)(!0);var e={log:!0,userCursor:!0,__platform:"bridge",appIdentifier:"",useMultiViews:!0};window.newWhiteSdk(e,(function(){}));var t={room:"",roomToken:""};window.replayRoom(t,(function(){}))}};var r=n(38789)},87670:function(){"use strict";"undefined"==typeof Proxy&&(window.__netlessMobXUseProxies="ifavailable")},59048:function(e,t,n){"use strict";n(18808),n(38298);var r=n(15073);window.ResizeObserver||(window.ResizeObserver=r.ResizeObserver),window.globalThis||(window.globalThis=window)},39310:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rtc=void 0;var r=n(70396);function o(e,t){for(var n=0;n0&&n[0].contentWindow?n[0].contentWindow.postMessage(t,"*"):0==n.length?(0,u.logger)("postmessage fail","no frames exist"):(0,u.logger)("postmessage fail","no content Window")})),f(this,"scaleIframeToFit",(function(){var e=n.aDisplayer.getInvisiblePlugin("IframeBridge");e&&e.scaleIframeToFit()})),f(this,"setDisableCameraTransform",(function(e){n.aDisplayer.disableCameraTransform=e})),f(this,"getDisableCameraTransform",(function(){return n.aDisplayer.disableCameraTransform})),f(this,"setCameraBound",(function(e){var t=(0,a.convertBound)(e);n.aDisplayer.setCameraBound(t)})),f(this,"getMemberState",(function(e){return JSON.stringify(n.aDisplayer.memberState(e))})),f(this,"getWindowManagerAttributes",(function(){var e,t;return JSON.parse(JSON.stringify(null===(e=window.manager)||void 0===e||null===(t=e.appManager)||void 0===t?void 0:t.attributes))})),f(this,"scenePathType",(function(e){return n.aDisplayer.scenePathType(e)})),f(this,"entireScenes",(function(){return n.aDisplayer.entireScenes()})),f(this,"getScene",(function(e){return n.aDisplayer.getScene(e)})),f(this,"moveCamera",(function(e){n.aDisplayer.moveCamera(e)})),f(this,"moveCameraToContain",(function(e){n.aDisplayer.moveCameraToContain(e)})),f(this,"refreshViewSize",(function(){n.aDisplayer.refreshViewSize()})),f(this,"scalePptToFit",(function(e){n.aDisplayer.scalePptToFit(e)})),f(this,"convertToPointInWorld",(function(e,t){return n.aDisplayer.convertToPointInWorld({x:e,y:t})})),f(this,"setBackgroundColor",(function(e,t,n,r){var o=document.getElementById(c.whiteboardContainerId),a="rgb(".concat(e,", ").concat(t,", ").concat(n,")");o.style.background=a})),f(this,"addHighFrequencyEventListener",(function(e,t){n.aDisplayer.addMagixEventListener(e,(function(e){var t=n.aDisplayer.uuid||n.aDisplayer.roomUUID,r=e.map((function(e){return{uuid:t,eventName:e.event,payload:e.payload,scope:e.scope,authorId:e.authorId}}));(0,s.isRoom)(n.aDisplayer)?(0,o.call)("room.fireHighFrequencyEvent",JSON.stringify(r)):(0,o.call)("player.fireHighFrequencyEvent",JSON.stringify(r))}),t)})),f(this,"addMagixEventListener",(function(e){n.aDisplayer.addMagixEventListener(e,(function(e){var t={uuid:n.aDisplayer.uuid||n.aDisplayer.roomUUID,eventName:e.event,payload:e.payload,scope:e.scope,authorId:e.authorId};(0,s.isRoom)(n.aDisplayer)?(0,o.call)("room.fireMagixEvent",JSON.stringify(t)):(0,o.call)("player.fireMagixEvent",JSON.stringify(t))}))})),f(this,"removeMagixEventListener",(function(e){n.aDisplayer.removeMagixEventListener(e)}))};t.DisplayerBridge=v},15581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addManagerListener=function(e,t,n){window.manager=e,function(e){return void 0!==e.onRoomStateChanged}(n)?function(e,t,n){e.emitter.on("cameraStateChange",(function(e){n.onRoomStateChanged({cameraState:e})})),e.emitter.on("sceneStateChange",(function(e){(0,r.call)("room.fireRoomStateChanged",JSON.stringify({sceneState:e}))})),e.emitter.on("boxStateChange",(function(e){n.onRoomStateChanged({windowBoxState:e})})),e.emitter.on("pageStateChange",(function(e){n.onRoomStateChanged({pageState:e})})),e.emitter.on("canRedoStepsChange",(function(e){n.onCanRedoStepsUpdate(e)})),e.emitter.on("canUndoStepsChange",(function(e){n.onCanUndoStepsUpdate(e)})),e.emitter.on("loadApp",(function(e){t("loadApp",e)}))}(e,t,n):function(e,t,n){e.emitter.on("cameraStateChange",(function(e){n.onPlayerStateChanged({cameraState:e})})),e.emitter.on("sceneStateChange",(function(e){(0,r.call)("player.onPlayerStateChanged",JSON.stringify({sceneState:e}))})),e.emitter.on("boxStateChange",(function(e){n.onPlayerStateChanged({windowBoxState:e})})),e.emitter.on("pageStateChange",(function(e){n.onPlayerStateChanged({pageState:e})})),e.emitter.on("loadApp",(function(e){t("loadApp",e)}))}(e,t,n)};var r=n(70396)},82969:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerPlayerBridge=function(e,t,n,l){window.player=e,window.combinePlayer=t,(0,o.registerDisplayerBridge)(e),(0,c.registerAsyn)(u.playerNameSpace,new g(e,t)),(0,c.register)(u.playerStateNameSpace,new m(e,t)),(0,i.addBridgeLogHook)([u.playerNameSpace,u.playerStateNameSpace],s.logger),t&&t.setOnStatusChange((function(e,t){switch(n.time=0,e){case a.PublicCombinedStatus.Pause:l.onPhaseChanged(r.PlayerPhase.Pause);break;case a.PublicCombinedStatus.PauseBuffering:case a.PublicCombinedStatus.PauseSeeking:case a.PublicCombinedStatus.PlayingBuffering:case a.PublicCombinedStatus.PlayingSeeking:l.onPhaseChanged(r.PlayerPhase.Buffering);break;case a.PublicCombinedStatus.Ended:l.onPhaseChanged(r.PlayerPhase.Ended);break;case a.PublicCombinedStatus.Playing:l.onPhaseChanged(r.PlayerPhase.Playing);break;case a.PublicCombinedStatus.Disabled:l.onStoppedWithError(new Error(t))}}))},t.PlayerAsyncBridge=t.PlayerStateBridge=void 0;var r=n(71895),o=n(16139),a=n(92710),i=n(28388),s=n(38789),c=n(70396),u=n(18371);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return r[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!==l(e[e.length-1])&&e.push(i(e,a)),t.apply(this,e)}))}return r[Symbol.replace].call(this,e,t)},h.apply(this,arguments)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&P(e,t)}function b(e){var t="function"==typeof Map?new Map:void 0;return b=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return w(e,arguments,O(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)},b(e)}function w(e,t,n){return w=S()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o},w.apply(null,arguments)}function S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function P(e,t){return P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},P(e,t)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t,n){var o=function(e){var t,n=e.map((function(e){return{name:e.name}})),r="",o="",a=h(/^pptx?(:\/\/[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\uFFFF]+?dynamicConvert)\/([0-9A-Z_a-z]+)\//,{prefix:1,taskId:2}),i=g(e);try{for(i.s();!(t=i.n()).done;){var s=t.value.ppt;if(s&&s.src.startsWith("ppt")){var c=a.exec(s.src);if(c&&c.groups){r=c.groups.taskId,o="https"+c.groups.prefix;break}}}}catch(e){i.e(e)}finally{i.f()}return{scenesWithoutPPT:n,taskId:r,url:o}}(n),a=o.scenesWithoutPPT,s=o.taskId,c=o.url;try{return s&&c?window.manager.addApp({kind:"Slide",options:{scenePath:e,title:t,scenes:a},attributes:{taskId:s,url:c}}).then((function(e){return window.fullScreen&&window.manager.setMaximized(!0),e})):window.manager.addApp({kind:r.BuiltinApps.DocsViewer,options:{scenePath:e,title:t,scenes:n}}).then((function(e){return window.fullScreen&&window.manager.setMaximized(!0),e}))}catch(e){return(0,i.logger)("addSlideApp error",e),Promise.reject()}}function C(e){e.getInvisiblePlugin("IframeBridge")&&e.getInvisiblePlugin("IframeBridge").computedZindex(),e.getInvisiblePlugin("IframeBridge")&&e.getInvisiblePlugin("IframeBridge").updateStyle()}function M(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.appId||e.focused;if(!a)return console.warn("not found "+(o.appId||"focused app")),!1;if(a.startsWith("DocsViewer-")){var i,s,c=null===(i=e.queryOne(a))||void 0===i||null===(s=i.box)||void 0===s?void 0:s.$footer;if(!c)return console.warn("not found app with id "+a),!1;var u=function(e){e&&e.dispatchEvent(new MouseEvent("click"))};switch(t){case"prevPage":case"prevStep":u(c.querySelector('button[class$="btn-page-back"]'));break;case"nextPage":case"nextStep":u(c.querySelector('button[class$="btn-page-next"]'));break;case"jumpToPage":if(n=o.page,!(r=c.querySelector('input[class$="page-number-input"]'))||"number"!=typeof n)return console.warn("failed to jump"+(n?" to page "+n:"")),!1;r.value=""+n,r.dispatchEvent(new InputEvent("change"));break;default:return console.warn("unknown event "+t),!1}return!0}if(!a.startsWith("Slide-"))return console.warn("not supported app "+a),!1;var l,f=null===(l=e.queryOne(a))||void 0===l?void 0:l.appResult;if(!f)return console.warn("not found app with id "+a),!1;switch(t){case"prevPage":return f.prevPage();case"nextPage":return f.nextPage();case"prevStep":return f.prevStep();case"nextStep":return f.nextStep();case"jumpToPage":return"number"!=typeof(n=o.page)?(console.warn("failed to jump"+(n?" to page "+n:"")),!1):f.jumpToPage(n);default:return console.warn("unknown event "+t),!1}}var j=function e(){p(this,e),m(this,"setWindowManagerAttributes",(function(e){var t,n;null===(t=window.manager)||void 0===t||t.safeSetAttributes(e),null===(n=window.manager)||void 0===n||n.refresh()})),m(this,"setContainerSizeRatio",(function(e){var t;null===(t=window.manager)||void 0===t||t.setContainerSizeRatio(e)})),m(this,"setPrefersColorScheme",(function(e){var t;null===(t=window.manager)||void 0===t||t.setPrefersColorScheme(e)}))};t.RoomBridge=j;var x=function e(t){var n=this;p(this,e),this.room=t,m(this,"nextStep",(function(){n.room.pptNextStep()})),m(this,"previousStep",(function(){n.room.pptPreviousStep()}))};t.RoomPPTBridge=x;var E=function e(t){var n=this;p(this,e),this.room=t,m(this,"syncBlockTimestamp",(function(e){n.room.syncBlockTimestamp(e)})),m(this,"disableSerialization",(function(e){n.room.disableSerialization=e,e||null!=window.manager||((0,c.call)("room.fireCanUndoStepsUpdate",n.room.canUndoSteps),(0,c.call)("room.fireCanRedoStepsUpdate",n.room.canRedoSteps))})),m(this,"copy",(function(){n.room.copy()})),m(this,"paste",(function(){n.room.paste()})),m(this,"duplicate",(function(){n.room.duplicate()})),m(this,"delete",(function(){n.room.delete()})),m(this,"disableEraseImage",(function(e){n.room.disableEraseImage=e}))};t.RoomSyncBridge=E;var I=function e(t){var n=this;p(this,e),this.room=t,m(this,"redo",(function(e){e(n.room.redo())})),m(this,"undo",(function(e){e(n.room.undo())})),m(this,"canRedoSteps",(function(e){window.manager?e(window.manager.canRedoSteps):e(n.room.canRedoSteps)})),m(this,"canUndoSteps",(function(e){window.manager?e(window.manager.canUndoSteps):e(n.room.canUndoSteps)})),m(this,"setGlobalState",(function(e){n.room.setGlobalState(e)})),m(this,"setScenePath",(function(e,t){try{window.manager?window.manager.setMainViewScenePath(e):n.room.setScenePath(e),t(JSON.stringify({}))}catch(e){return t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}})),m(this,"addPage",(function(e,t){if(window.manager)window.manager.addPage(e).then((function(){t&&t()})).catch((function(e){if(t)return t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}));else{var r=n.room.state.sceneState.contextPath;if(e.after){var o=n.room.state.sceneState.index+1;n.room.putScenes(r,[e.scene||{}],o)}else n.room.putScenes(r,[e.scene||{}]);t&&setTimeout((function(){t()}),0)}})),m(this,"removePage",(function(e,t){if(!window.manager){var r=n.room.state.sceneState.scenes,o=e.index||n.room.state.sceneState.index;if(1==r.length)return(0,i.logger)("removePage warning","can't remove the last page"),t(JSON.stringify({__error:{message:"removePage warning, can't remove the last page"}}));if(o=0?(n.room.setSceneIndex(t),e(!0)):e(!1)}})),m(this,"setMemberState",(function(e){n.room.setMemberState(e)})),m(this,"setViewMode",(function(e){var t=o.ViewMode[e];void 0===t&&(t=o.ViewMode.Freedom),window.manager?window.manager.setViewMode(t):n.room.setViewMode(t)})),m(this,"setWritable",(function(e,t){n.room.setWritable(e).then((function(){t(JSON.stringify({isWritable:n.room.isWritable,observerId:n.room.observerId}))})).catch((function(e){t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}))})),m(this,"getMemberState",(function(e){return e(JSON.stringify(n.room.state.memberState))})),m(this,"getGlobalState",(function(e){return e(JSON.stringify(n.room.state.globalState))})),m(this,"getSceneState",(function(e){return e(JSON.stringify(n.room.state.sceneState))})),m(this,"getRoomMembers",(function(e){return e(JSON.stringify(n.room.state.roomMembers))})),m(this,"getPptImages",(function(e){var t=n.room.state.sceneState.scenes.map((function(e){return e.ppt?e.ppt.src:""}));return e(JSON.stringify(t))})),m(this,"setSceneIndex",(function(e,t){try{window.manager?window.manager.setMainViewSceneIndex(e):n.room.setSceneIndex(e),t(JSON.stringify({}))}catch(e){t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}})),m(this,"getScenes",(function(e){return e(JSON.stringify(n.room.state.sceneState.scenes))})),m(this,"getZoomScale",(function(e){var t=1;return t=window.manager?window.manager.mainView.camera.scale:n.room.state.cameraState.scale,e(JSON.stringify(t))})),m(this,"getBroadcastState",(function(e){return e(JSON.stringify(n.room.state.broadcastState))})),m(this,"getRoomPhase",(function(e){return e(n.room.phase)})),m(this,"disconnect",(function(e){n.room.disconnect().then((function(){e()}))})),m(this,"zoomChange",(function(e){n.room.moveCamera({scale:e})})),m(this,"disableCameraTransform",(function(e){n.room.disableCameraTransform=e})),m(this,"disableDeviceInputs",(function(e){window.manager&&window.manager.setReadonly(e),n.room.disableDeviceInputs=e,C(n.room)})),m(this,"disableOperations",(function(e){n.room.disableCameraTransform=e,n.room.disableDeviceInputs=e,C(n.room)})),m(this,"disableWindowOperation",(function(e){var t;null===(t=window.manager)||void 0===t||t.setReadonly(e)})),m(this,"putScenes",(function(e,t,r,o){n.room.putScenes(e,t,r),o(JSON.stringify(n.room.state.sceneState))})),m(this,"removeScenes",(function(e){n.room.removeScenes(e)})),m(this,"moveScene",(function(e,t){n.room.moveScene(e,t)})),m(this,"insertText",(function(e,t,r,o){var a;window.manager?o(null===(a=window.manager.focusedView)||void 0===a?void 0:a.insertText(e,t,r)):o(n.room.insertText(e,t,r))})),m(this,"updateText",(function(e,t){var r;window.manager?null===(r=window.manager.focusedView)||void 0===r||r.updateText(e,t):n.room.updateText(e,t)})),m(this,"cleanScene",(function(e){n.room.cleanCurrentScene(e)})),m(this,"insertImage",(function(e){n.room.insertImage(e)})),m(this,"insertVideo",(function(e){})),m(this,"completeImageUpload",(function(e,t){n.room.completeImageUpload(e,t)})),m(this,"dispatchMagixEvent",(function(e){n.room.dispatchMagixEvent(e.eventName,e.payload)})),m(this,"setTimeDelay",(function(e){n.room.timeDelay=e})),m(this,"addApp",(function(e,t,n,r){if(window.manager){if("Slide"===e){var o=n||{},a=o.taskId,i=o.url;if(a&&i)window.manager.addApp({kind:e,options:t,attributes:n}).then((function(e){r(e)}));else{var s=t;k(s.scenePath,s.title,s.scenes).then((function(e){r(e)}))}}else window.manager.addApp({kind:e,options:t,attributes:n}).then((function(e){r(e)}));window.fullScreen&&window.manager.setMaximized(!0)}})),m(this,"closeApp",(function(e,t){window.manager&&window.manager.closeApp(e).then((function(){return t(void 0)}))})),m(this,"focusApp",(function(e){window.manager&&window.manager.focusApp(e)})),m(this,"queryAllApps",(function(e){if(window.manager)return e(window.manager.apps?JSON.stringify(window.manager.apps):{})})),m(this,"queryApp",(function(e,t){if(window.manager){var n=window.manager.apps;if(!n)return t(JSON.stringify({__error:{message:"apps not existed"}}));var r=n[e];return t(r?JSON.stringify(r):JSON.stringify({__error:{message:"app "+e+" not existed"}}))}})),m(this,"dispatchDocsEvent",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;window.manager&&n(M(window.manager,e,t||{}))})),m(this,"syncMode",(function(e){n.room.syncMode=e}))};t.RoomAsyncBridge=I;var _=function e(t){var n=this;p(this,e),this.room=t,m(this,"getRoomState",(function(){var e=n.room.state;return window.manager?d(d(d({},e),{windowBoxState:window.manager.boxState}),{},{cameraState:window.manager.cameraState,sceneState:window.manager.sceneState},{pageState:window.manager.pageState}):d(d({},e),(0,a.createPageState)(e.sceneState))})),m(this,"getTimeDelay",(function(){return n.room.timeDelay})),m(this,"getPhase",(function(){return n.room.phase})),m(this,"isWritable",(function(){return n.room.isWritable})),m(this,"debugInfo",(function(){try{var e=n.room.screen,t=e.camera,r=e.visionRectangle,o=e.adaptedRectangle,a=e.divElement;return{camera:t,visionRectangle:r,adaptedRectangle:o,divWidth:a.clientWidth,divHeight:a.clientHeight}}catch(e){return{error:e.message}}}))};t.RoomStateBridge=_},5294:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setWhiteboardDivGetter=function(e){U=e},t.registerSDKBridge=function(){var e=new te;(0,s.registerAsyn)("sdk",e),window.newWhiteSdk=e.newWhiteSdk,window.joinRoom=e.joinRoom,window.replayRoom=e.replayRoom,(0,O.addBridgeLogHook)(["sdk"],b.logger)},t.sdkCallbackHandler=void 0;var o,a=n(54505),i=n(20597),s=n(70396),c=n(71895),u=n(44112),l=n(87980),f=n(56868),d=n(25275),p=n(59849),m=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(24496)),g=n(29165),y=n(46640),h=n(25242),v=n(24645),b=n(38789),w=n(51126),S=n(15581),P=n(42470),O=n(28388),k=n(15748),C=(o=n(92710))&&o.__esModule?o:{default:o},M=n(33739),j=n(82969),x=n(39310),E=n(25219),I=n(97839);function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function A(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||N(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=N(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function N(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){J(a,r,o,i,s,"next",e)}function s(e){J(a,r,o,i,s,"throw",e)}i(void 0)}))}}var U,H=void 0,V=void 0,z=void 0,G=new x.Rtc,q=void 0,$=void 0,K=new E.SDKCallbackHandler;t.sdkCallbackHandler=K;var X="whiteboard-native-css",Z="whiteboard-native-font-face";(0,c.setAsyncModuleLoadMode)(c.AsyncModuleLoadMode.StoreAsBase64);function Y(){window.manager?(window.manager.destroy(),window.manager=void 0,V=void 0,z=void 0):V?(V.bindHtmlElement(null),V=void 0):z&&(z.bindHtmlElement(null),z=void 0),window.syncedStore&&(0,I.destroySyncedStore)()}function Q(e,t,n){return ee.apply(this,arguments)}function ee(){return ee=L(regeneratorRuntime.mark((function e(t,n,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.WindowManager.mount(B(B({containerSizeRatio:9/16,chessboard:!0,cursor:!!$},r),{},{container:U(),room:t}));case 2:return o=e.sent,(0,S.addManagerListener)(o,b.logger,n),e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)}))),ee.apply(this,arguments)}var te=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),F(this,"newWhiteSdk",(function(e){var t=e.enableInterrupterAPI?function(e){var t=K.onUrlInterrupter(e);return t.length>0?t:e}:void 0,n=function(){var t=L(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.enableSlideInterrupterAPI){t.next=6;break}return t.next=3,K.slideUrlInterrupter(n);case 3:return r=t.sent,console.log("slideUrlInterrupter",n,r),t.abrupt("return",r.length>0?r:n);case 6:return t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=e.log,o=e.__nativeTags,s=e.__platform,w=e.__netlessUA,S=(e.initializeOriginsStates,e.useMultiViews),P=e.userCursor,O=(e.enableInterrupterAPI,e.routeBackup,e.enableRtcIntercept),k=e.enableImgErrorCallback,C=e.enableIFramePlugin,M=e.enableSyncedStore,j=W(e,["log","__nativeTags","__platform","__netlessUA","initializeOriginsStates","useMultiViews","userCursor","enableInterrupterAPI","routeBackup","enableRtcIntercept","enableImgErrorCallback","enableIFramePlugin","enableSyncedStore"]);(0,b.enableReport)(!!r),q=e,s&&(window.__platform=s),w&&(window.__netlessUA=w.join(" ")),k&&(0,a.hookCreateElement)(),$=P?new i.CursorTool:void 0,o&&(window.__nativeTags=B(B({},window.__nativeTags),o));var x=j.pptParams||{};O&&(x.rtcClient=G,(0,m.usePlugin)(new g.RTCPlugin(G)));var E,I=[],_=R(window.pluginParams||[]);try{for(_.s();!(E=_.n()).done;){var N=E.value,T=F({},N.name,window[N.variable]);I.push(T)}}catch(e){_.e(e)}finally{_.f()}var D=(0,c.createPlugins)(B({video:u.videoPlugin,audio:l.audioPlugin,video2:f.videoPlugin2,audio2:d.audioPlugin2,"video.js":(0,p.videoJsPlugin)({log:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=c.time?(e(),c.time=Math.ceil(t/n)*n):r&&t+n>r.timeDuration&&(e(),c.time=t))}((function(){(0,r.call)("player.onScheduleTimeChanged",e)}),e,u),l&&(0,a.postIframeMessage)({eventName:"onProgressTimeChanged",params:[e]},i.logger)})),s(this,"onCatchErrorWhenAppendFrame",(function(e,t){})),s(this,"onCatchErrorWhenRender",(function(e){(0,r.call)("player.onCatchErrorWhenRender",{error:e.message})})),l=f,u=t,this.onPhaseChanged=function(e){var t=window.player;if(void 0!==t){d(t,e);var s=function(e){c.time=0,(0,r.call)("player.onPhaseChanged",e),l&&(0,a.postIframeMessage)({eventName:"onPhaseChanged",params:[e]},i.logger)};n&&e!==o.PlayerPhase.WaitingFirstFrame&&e!==o.PlayerPhase.Stopped||s(e)}}}},42470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RoomCallbackHandler=void 0;var r=n(38789),o=n(70396),a=n(28388),i=n(71895);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.RoomCallbackHandler=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"onPhaseChanged",(function(e){(0,o.call)("room.firePhaseChanged",e);var t=window.room;t&&t.phase===i.RoomPhase.Reconnecting&&setTimeout((function(){t&&t.phase===i.RoomPhase.Reconnecting&&((0,r.logger)("room start disconnect by reconnecting timeout by bridge"),t.disconnect().then((function(){var e="Reconnect time exceeds ".concat(45e3," milliseconds, sdk call disconnect automatically");(0,r.logger)(e),(0,o.call)("room.fireDisconnectWithError",e)})))}),45e3)})),l(this,"onCanUndoStepsUpdate",(function(e){(0,o.call)("room.fireCanUndoStepsUpdate",e)})),l(this,"onCanRedoStepsUpdate",(function(e){(0,o.call)("room.fireCanRedoStepsUpdate",e)})),l(this,"onRoomStateChanged",(function(e){var t=e,n=t.sceneState,r=u(t,["sceneState"]);window.manager?0!==Object.keys(r).length&&(0,o.call)("room.fireRoomStateChanged",JSON.stringify(r)):(n&&(e=c(c({},e),(0,a.createPageState)(n))),(0,o.call)("room.fireRoomStateChanged",JSON.stringify(e)))})),l(this,"onDisconnectWithError",(function(e){(0,o.call)("room.fireDisconnectWithError",e.message)})),l(this,"onKickedWithReason",(function(e){(0,o.call)("room.fireKickedWithReason",e)})),l(this,"onCatchErrorWhenAppendFrame",(function(e,t){(0,r.logger)("onCatchErrorWhenAppendFrame",[e,t.message]),(0,o.call)("room.fireCatchErrorWhenAppendFrame",{userId:e,error:t.message})})),l(this,"onCatchErrorWhenRender",(function(e){}))}},25219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKCallbackHandler=void 0;var r=n(70396);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.SDKCallbackHandler=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"onPostMessage",(function(e){(0,r.call)("sdk.postMessage",e)})),o(this,"onThrowError",(function(e){(0,r.call)("sdk.throwError",e)})),o(this,"onLogger",(function(e){(0,r.call)("sdk.logger",e)})),o(this,"onUrlInterrupter",(function(e){return(0,r.syncCall)("sdk.urlInterrupter",e)})),o(this,"slideUrlInterrupter",(function(e){return(0,r.asyncCall)("sdk.slideUrlInterrupter",e)})),o(this,"onSetupFail",(function(e){(0,r.call)("sdk.setupFail",{message:e.message,jsStack:e.stack})})),o(this,"onPPTLoadProgress",(function(e,t){})),o(this,"onPPTMediaPlay",(function(e,t){console.log("onPPTMediaPlay"),(0,r.call)("sdk.onPPTMediaPlay",{shapeId:e,type:t})})),o(this,"onPPTMediaPause",(function(e,t){(0,r.call)("sdk.onPPTMediaPause",{shapeId:e,type:t})}))}},51126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertBound=function(e){if(!e)return;return{centerX:e.centerX,centerY:e.centerY,width:e.width,height:e.height,maxContentMode:a(e.maxContentMode),minContentMode:a(e.minContentMode)}};var r=n(71895),o=n(18371);function a(e){if(e){var t=void 0===e.scale?1:e.scale,n=void 0===e.space?0:e.space;o.ScaleMode.Scale;switch("string"==typeof e.mode?parseInt(o.ScaleMode[e.mode]):e.mode){case o.ScaleMode.Scale:return(0,r.contentModeScale)(t);case o.ScaleMode.AspectFill:return(0,r.contentModeAspectFill)();case o.ScaleMode.AspectFillScale:return(0,r.contentModeAspectFillScale)(t);case o.ScaleMode.AspectFit:return(0,r.contentModeAspectFit)();case o.ScaleMode.AspectFitScale:return(0,r.contentModeAspectFitScale)(t);case o.ScaleMode.AspectFitSpace:return(0,r.contentModeAspectFitSpace)(n);default:return}}}},28388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addBridgeLogHook=function(e,t){function n(e){return e.keys&&e.keys()||Object.getOwnPropertyNames(e)}function r(e,t){return e.get&&e.get(t)||e[t]}var o,s=void 0!==window.ReactNativeWebView,c=s?window.bridge.asyncMethods:window.bridge.registerMap.async,u=i(n(c));try{for(u.s();!(o=u.n()).done;){var l=o.value;if(e.includes(l)){var f,d=r(c,l),p=i(Object.getOwnPropertyNames(d));try{var m=function(){var e=f.value,n=d[e];if("function"!=typeof n)return"continue";d[e]=function(){for(var r=arguments.length,o=new Array(r),i=0;i=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n2?n-2:0),s=2;s0&&u()}else{var p=[t].concat(a(f));c.push(p)}l=0===i.length?void 0:1===i.length?i[0]:i.every((function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}))?i.join(" "):i,e&&r.sdkCallbackHandler.onLogger({funName:t,params:l})}},89774:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postIframeMessage=function(e,t){var n={name:"parentWindow",payload:e},r=document.getElementsByTagName("iframe");if(r.length>0&&r[0].contentWindow){r[0].contentWindow.postMessage(n,"*")}else 0==r.length?null==t||t("postmessage fail","no frames exist"):null==t||t("postmessage fail","no conentWindow")}},25893:function(){},75042:function(){},65586:function(){}},function(e){e.O(0,[378,83,791,736],(function(){return t=36037,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +(self.webpackChunkwhiteboard_bridge=self.webpackChunkwhiteboard_bridge||[]).push([[179],{80782:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=80782,e.exports=t},89734:function(e,t,n){"use strict";n.r(t)},6167:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,o.useEffect)((function(){return function(){window.removeEventListener("error",a.globalErrorEvent),window.removeEventListener("message",a.postCustomMessage)}}),[]),window.addEventListener("error",a.globalErrorEvent),window.addEventListener("message",a.postCustomMessage);var e=(0,o.useRef)(null);return(0,i.setWhiteboardDivGetter)((function(){return e.current})),o.default.createElement("div",{id:c,ref:e,style:{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:1}})},t.whiteboardContainerId=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(17328)),a=n(28388),i=n(5294);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}n(19418),n(89734),n(75735);var c="whiteboard-container";t.whiteboardContainerId=c},24433:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDebugFunctions=function(){window.testRoom=function(){(0,r.enableReport)(!0);var e={log:!0,userCursor:!0,__platform:"bridge",appIdentifier:"",useMultiViews:!0};window.newWhiteSdk(e,(function(){}));var t={uuid:"",uid:"0",roomToken:"",windowParams:{containerSizeRatio:3/4,fullscreen:!1},userPayload:{avatar:"https://white-pan.oss-cn-shanghai.aliyuncs.com/40/image/mask.jpg"}};window.joinRoom(t,(function(){window.bridgeRoom=window.bridge.registerMap.async.room}))},window.testReplay=function(){(0,r.enableReport)(!0);var e={log:!0,userCursor:!0,__platform:"bridge",appIdentifier:"",useMultiViews:!0};window.newWhiteSdk(e,(function(){}));var t={room:"",roomToken:""};window.replayRoom(t,(function(){}))}};var r=n(38789)},87670:function(){"use strict";"undefined"==typeof Proxy&&(window.__netlessMobXUseProxies="ifavailable")},59048:function(e,t,n){"use strict";n(18808),n(38298);var r=n(15073);window.ResizeObserver||(window.ResizeObserver=r.ResizeObserver),window.globalThis||(window.globalThis=window)},39310:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rtc=void 0;var r=n(70396);function o(e,t){for(var n=0;n0&&n[0].contentWindow?n[0].contentWindow.postMessage(t,"*"):0==n.length?(0,u.logger)("postmessage fail","no frames exist"):(0,u.logger)("postmessage fail","no content Window")})),f(this,"scaleIframeToFit",(function(){var e=n.aDisplayer.getInvisiblePlugin("IframeBridge");e&&e.scaleIframeToFit()})),f(this,"setDisableCameraTransform",(function(e){n.aDisplayer.disableCameraTransform=e})),f(this,"getDisableCameraTransform",(function(){return n.aDisplayer.disableCameraTransform})),f(this,"setCameraBound",(function(e){var t=(0,a.convertBound)(e);n.aDisplayer.setCameraBound(t)})),f(this,"getMemberState",(function(e){return JSON.stringify(n.aDisplayer.memberState(e))})),f(this,"getWindowManagerAttributes",(function(){var e,t;return JSON.parse(JSON.stringify(null===(e=window.manager)||void 0===e||null===(t=e.appManager)||void 0===t?void 0:t.attributes))})),f(this,"scenePathType",(function(e){return n.aDisplayer.scenePathType(e)})),f(this,"entireScenes",(function(){return n.aDisplayer.entireScenes()})),f(this,"getScene",(function(e){return n.aDisplayer.getScene(e)})),f(this,"moveCamera",(function(e){n.aDisplayer.moveCamera(e)})),f(this,"moveCameraToContain",(function(e){n.aDisplayer.moveCameraToContain(e)})),f(this,"refreshViewSize",(function(){n.aDisplayer.refreshViewSize()})),f(this,"scalePptToFit",(function(e){n.aDisplayer.scalePptToFit(e)})),f(this,"convertToPointInWorld",(function(e,t){return n.aDisplayer.convertToPointInWorld({x:e,y:t})})),f(this,"setBackgroundColor",(function(e,t,n,r){var o=document.getElementById(c.whiteboardContainerId),a="rgb(".concat(e,", ").concat(t,", ").concat(n,")");o.style.background=a})),f(this,"addHighFrequencyEventListener",(function(e,t){n.aDisplayer.addMagixEventListener(e,(function(e){var t=n.aDisplayer.uuid||n.aDisplayer.roomUUID,r=e.map((function(e){return{uuid:t,eventName:e.event,payload:e.payload,scope:e.scope,authorId:e.authorId}}));(0,s.isRoom)(n.aDisplayer)?(0,o.call)("room.fireHighFrequencyEvent",JSON.stringify(r)):(0,o.call)("player.fireHighFrequencyEvent",JSON.stringify(r))}),t)})),f(this,"addMagixEventListener",(function(e){n.aDisplayer.addMagixEventListener(e,(function(e){var t={uuid:n.aDisplayer.uuid||n.aDisplayer.roomUUID,eventName:e.event,payload:e.payload,scope:e.scope,authorId:e.authorId};(0,s.isRoom)(n.aDisplayer)?(0,o.call)("room.fireMagixEvent",JSON.stringify(t)):(0,o.call)("player.fireMagixEvent",JSON.stringify(t))}))})),f(this,"removeMagixEventListener",(function(e){n.aDisplayer.removeMagixEventListener(e)}))};t.DisplayerBridge=v},15581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addManagerListener=function(e,t,n){window.manager=e,function(e){return void 0!==e.onRoomStateChanged}(n)?function(e,t,n){e.emitter.on("cameraStateChange",(function(e){n.onRoomStateChanged({cameraState:e})})),e.emitter.on("sceneStateChange",(function(e){(0,r.call)("room.fireRoomStateChanged",JSON.stringify({sceneState:e}))})),e.emitter.on("boxStateChange",(function(e){n.onRoomStateChanged({windowBoxState:e})})),e.emitter.on("pageStateChange",(function(e){n.onRoomStateChanged({pageState:e})})),e.emitter.on("canRedoStepsChange",(function(e){n.onCanRedoStepsUpdate(e)})),e.emitter.on("canUndoStepsChange",(function(e){n.onCanUndoStepsUpdate(e)})),e.emitter.on("loadApp",(function(e){t("loadApp",e)}))}(e,t,n):function(e,t,n){e.emitter.on("cameraStateChange",(function(e){n.onPlayerStateChanged({cameraState:e})})),e.emitter.on("sceneStateChange",(function(e){(0,r.call)("player.onPlayerStateChanged",JSON.stringify({sceneState:e}))})),e.emitter.on("boxStateChange",(function(e){n.onPlayerStateChanged({windowBoxState:e})})),e.emitter.on("pageStateChange",(function(e){n.onPlayerStateChanged({pageState:e})})),e.emitter.on("loadApp",(function(e){t("loadApp",e)}))}(e,t,n)};var r=n(70396)},82969:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerPlayerBridge=function(e,t,n,l){window.player=e,window.combinePlayer=t,(0,o.registerDisplayerBridge)(e),(0,c.registerAsyn)(u.playerNameSpace,new g(e,t)),(0,c.register)(u.playerStateNameSpace,new m(e,t)),(0,i.addBridgeLogHook)([u.playerNameSpace,u.playerStateNameSpace],s.logger),t&&t.setOnStatusChange((function(e,t){switch(n.time=0,e){case a.PublicCombinedStatus.Pause:l.onPhaseChanged(r.PlayerPhase.Pause);break;case a.PublicCombinedStatus.PauseBuffering:case a.PublicCombinedStatus.PauseSeeking:case a.PublicCombinedStatus.PlayingBuffering:case a.PublicCombinedStatus.PlayingSeeking:l.onPhaseChanged(r.PlayerPhase.Buffering);break;case a.PublicCombinedStatus.Ended:l.onPhaseChanged(r.PlayerPhase.Ended);break;case a.PublicCombinedStatus.Playing:l.onPhaseChanged(r.PlayerPhase.Playing);break;case a.PublicCombinedStatus.Disabled:l.onStoppedWithError(new Error(t))}}))},t.PlayerAsyncBridge=t.PlayerStateBridge=void 0;var r=n(71895),o=n(16139),a=n(92710),i=n(28388),s=n(38789),c=n(70396),u=n(18371);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return r[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!==l(e[e.length-1])&&e.push(i(e,a)),t.apply(this,e)}))}return r[Symbol.replace].call(this,e,t)},h.apply(this,arguments)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&P(e,t)}function b(e){var t="function"==typeof Map?new Map:void 0;return b=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return w(e,arguments,O(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)},b(e)}function w(e,t,n){return w=S()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o},w.apply(null,arguments)}function S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function P(e,t){return P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},P(e,t)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t,n){var o=function(e){var t,n=e.map((function(e){return{name:e.name}})),r="",o="",a=h(/^pptx?(:\/\/[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\uFFFF]+?dynamicConvert)\/([0-9A-Z_a-z]+)\//,{prefix:1,taskId:2}),i=g(e);try{for(i.s();!(t=i.n()).done;){var s=t.value.ppt;if(s&&s.src.startsWith("ppt")){var c=a.exec(s.src);if(c&&c.groups){r=c.groups.taskId,o="https"+c.groups.prefix;break}}}}catch(e){i.e(e)}finally{i.f()}return{scenesWithoutPPT:n,taskId:r,url:o}}(n),a=o.scenesWithoutPPT,s=o.taskId,c=o.url;try{return s&&c?window.manager.addApp({kind:"Slide",options:{scenePath:e,title:t,scenes:a},attributes:{taskId:s,url:c}}).then((function(e){return window.fullScreen&&window.manager.setMaximized(!0),e})):window.manager.addApp({kind:r.BuiltinApps.DocsViewer,options:{scenePath:e,title:t,scenes:n}}).then((function(e){return window.fullScreen&&window.manager.setMaximized(!0),e}))}catch(e){return(0,i.logger)("addSlideApp error",e),Promise.reject()}}function C(e){e.getInvisiblePlugin("IframeBridge")&&e.getInvisiblePlugin("IframeBridge").computedZindex(),e.getInvisiblePlugin("IframeBridge")&&e.getInvisiblePlugin("IframeBridge").updateStyle()}function M(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.appId||e.focused;if(!a)return console.warn("not found "+(o.appId||"focused app")),!1;if(a.startsWith("DocsViewer-")){var i,s,c=null===(i=e.queryOne(a))||void 0===i||null===(s=i.box)||void 0===s?void 0:s.$footer;if(!c)return console.warn("not found app with id "+a),!1;var u=function(e){e&&e.dispatchEvent(new MouseEvent("click"))};switch(t){case"prevPage":case"prevStep":u(c.querySelector('button[class$="btn-page-back"]'));break;case"nextPage":case"nextStep":u(c.querySelector('button[class$="btn-page-next"]'));break;case"jumpToPage":if(n=o.page,!(r=c.querySelector('input[class$="page-number-input"]'))||"number"!=typeof n)return console.warn("failed to jump"+(n?" to page "+n:"")),!1;r.value=""+n,r.dispatchEvent(new InputEvent("change"));break;default:return console.warn("unknown event "+t),!1}return!0}if(!a.startsWith("Slide-"))return console.warn("not supported app "+a),!1;var l,f=null===(l=e.queryOne(a))||void 0===l?void 0:l.appResult;if(!f)return console.warn("not found app with id "+a),!1;switch(t){case"prevPage":return f.prevPage();case"nextPage":return f.nextPage();case"prevStep":return f.prevStep();case"nextStep":return f.nextStep();case"jumpToPage":return"number"!=typeof(n=o.page)?(console.warn("failed to jump"+(n?" to page "+n:"")),!1):f.jumpToPage(n);default:return console.warn("unknown event "+t),!1}}var j=function e(){p(this,e),m(this,"setWindowManagerAttributes",(function(e){var t,n;null===(t=window.manager)||void 0===t||t.safeSetAttributes(e),null===(n=window.manager)||void 0===n||n.refresh()})),m(this,"setContainerSizeRatio",(function(e){var t;null===(t=window.manager)||void 0===t||t.setContainerSizeRatio(e)})),m(this,"setPrefersColorScheme",(function(e){var t;null===(t=window.manager)||void 0===t||t.setPrefersColorScheme(e)}))};t.RoomBridge=j;var x=function e(t){var n=this;p(this,e),this.room=t,m(this,"nextStep",(function(){n.room.pptNextStep()})),m(this,"previousStep",(function(){n.room.pptPreviousStep()}))};t.RoomPPTBridge=x;var E=function e(t){var n=this;p(this,e),this.room=t,m(this,"syncBlockTimestamp",(function(e){n.room.syncBlockTimestamp(e)})),m(this,"disableSerialization",(function(e){n.room.disableSerialization=e,e||null!=window.manager||((0,c.call)("room.fireCanUndoStepsUpdate",n.room.canUndoSteps),(0,c.call)("room.fireCanRedoStepsUpdate",n.room.canRedoSteps))})),m(this,"copy",(function(){n.room.copy()})),m(this,"paste",(function(){n.room.paste()})),m(this,"duplicate",(function(){n.room.duplicate()})),m(this,"delete",(function(){n.room.delete()})),m(this,"disableEraseImage",(function(e){n.room.disableEraseImage=e}))};t.RoomSyncBridge=E;var I=function e(t){var n=this;p(this,e),this.room=t,m(this,"redo",(function(e){e(n.room.redo())})),m(this,"undo",(function(e){e(n.room.undo())})),m(this,"canRedoSteps",(function(e){window.manager?e(window.manager.canRedoSteps):e(n.room.canRedoSteps)})),m(this,"canUndoSteps",(function(e){window.manager?e(window.manager.canUndoSteps):e(n.room.canUndoSteps)})),m(this,"setGlobalState",(function(e){n.room.setGlobalState(e)})),m(this,"setScenePath",(function(e,t){try{window.manager?window.manager.setMainViewScenePath(e):n.room.setScenePath(e),t(JSON.stringify({}))}catch(e){return t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}})),m(this,"addPage",(function(e,t){if(window.manager)window.manager.addPage(e).then((function(){t&&t()})).catch((function(e){if(t)return t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}));else{var r=n.room.state.sceneState.contextPath;if(e.after){var o=n.room.state.sceneState.index+1;n.room.putScenes(r,[e.scene||{}],o)}else n.room.putScenes(r,[e.scene||{}]);t&&setTimeout((function(){t()}),0)}})),m(this,"removePage",(function(e,t){if(!window.manager){var r=n.room.state.sceneState.scenes,o=e.index||n.room.state.sceneState.index;if(1==r.length)return(0,i.logger)("removePage warning","can't remove the last page"),t(JSON.stringify({__error:{message:"removePage warning, can't remove the last page"}}));if(o=0?(n.room.setSceneIndex(t),e(!0)):e(!1)}})),m(this,"setMemberState",(function(e){n.room.setMemberState(e)})),m(this,"setViewMode",(function(e){var t=o.ViewMode[e];void 0===t&&(t=o.ViewMode.Freedom),window.manager?window.manager.setViewMode(t):n.room.setViewMode(t)})),m(this,"setWritable",(function(e,t){n.room.setWritable(e).then((function(){t(JSON.stringify({isWritable:n.room.isWritable,observerId:n.room.observerId}))})).catch((function(e){t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}))})),m(this,"getMemberState",(function(e){return e(JSON.stringify(n.room.state.memberState))})),m(this,"getGlobalState",(function(e){return e(JSON.stringify(n.room.state.globalState))})),m(this,"getSceneState",(function(e){return e(JSON.stringify(n.room.state.sceneState))})),m(this,"getRoomMembers",(function(e){return e(JSON.stringify(n.room.state.roomMembers))})),m(this,"getPptImages",(function(e){var t=n.room.state.sceneState.scenes.map((function(e){return e.ppt?e.ppt.src:""}));return e(JSON.stringify(t))})),m(this,"setSceneIndex",(function(e,t){try{window.manager?window.manager.setMainViewSceneIndex(e):n.room.setSceneIndex(e),t(JSON.stringify({}))}catch(e){t(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}})),m(this,"getScenes",(function(e){return e(JSON.stringify(n.room.state.sceneState.scenes))})),m(this,"getZoomScale",(function(e){var t=1;return t=window.manager?window.manager.mainView.camera.scale:n.room.state.cameraState.scale,e(JSON.stringify(t))})),m(this,"getBroadcastState",(function(e){return e(JSON.stringify(n.room.state.broadcastState))})),m(this,"getRoomPhase",(function(e){return e(n.room.phase)})),m(this,"disconnect",(function(e){n.room.disconnect().then((function(){e()}))})),m(this,"zoomChange",(function(e){n.room.moveCamera({scale:e})})),m(this,"disableCameraTransform",(function(e){n.room.disableCameraTransform=e})),m(this,"disableDeviceInputs",(function(e){window.manager&&window.manager.setReadonly(e),n.room.disableDeviceInputs=e,C(n.room)})),m(this,"disableOperations",(function(e){n.room.disableCameraTransform=e,n.room.disableDeviceInputs=e,C(n.room)})),m(this,"disableWindowOperation",(function(e){var t;null===(t=window.manager)||void 0===t||t.setReadonly(e)})),m(this,"putScenes",(function(e,t,r,o){n.room.putScenes(e,t,r),o(JSON.stringify(n.room.state.sceneState))})),m(this,"removeScenes",(function(e){n.room.removeScenes(e)})),m(this,"moveScene",(function(e,t){n.room.moveScene(e,t)})),m(this,"insertText",(function(e,t,r,o){var a;window.manager?o(null===(a=window.manager.focusedView)||void 0===a?void 0:a.insertText(e,t,r)):o(n.room.insertText(e,t,r))})),m(this,"updateText",(function(e,t){var r;window.manager?null===(r=window.manager.focusedView)||void 0===r||r.updateText(e,t):n.room.updateText(e,t)})),m(this,"cleanScene",(function(e){n.room.cleanCurrentScene(e)})),m(this,"insertImage",(function(e){n.room.insertImage(e)})),m(this,"insertVideo",(function(e){})),m(this,"completeImageUpload",(function(e,t){n.room.completeImageUpload(e,t)})),m(this,"dispatchMagixEvent",(function(e){n.room.dispatchMagixEvent(e.eventName,e.payload)})),m(this,"setTimeDelay",(function(e){n.room.timeDelay=e})),m(this,"addApp",(function(e,t,n,r){if(window.manager){if("Slide"===e){var o=n||{},a=o.taskId,i=o.url;if(a&&i)window.manager.addApp({kind:e,options:t,attributes:n}).then((function(e){r(e)}));else{var s=t;k(s.scenePath,s.title,s.scenes).then((function(e){r(e)}))}}else window.manager.addApp({kind:e,options:t,attributes:n}).then((function(e){r(e)}));window.fullScreen&&window.manager.setMaximized(!0)}})),m(this,"closeApp",(function(e,t){window.manager&&window.manager.closeApp(e).then((function(){return t(void 0)}))})),m(this,"focusApp",(function(e){window.manager&&window.manager.focusApp(e)})),m(this,"queryAllApps",(function(e){if(window.manager)return e(window.manager.apps?JSON.stringify(window.manager.apps):{})})),m(this,"queryApp",(function(e,t){if(window.manager){var n=window.manager.apps;if(!n)return t(JSON.stringify({__error:{message:"apps not existed"}}));var r=n[e];return t(r?JSON.stringify(r):JSON.stringify({__error:{message:"app "+e+" not existed"}}))}})),m(this,"dispatchDocsEvent",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;window.manager&&n(M(window.manager,e,t||{}))})),m(this,"syncMode",(function(e){n.room.syncMode=e}))};t.RoomAsyncBridge=I;var _=function e(t){var n=this;p(this,e),this.room=t,m(this,"getRoomState",(function(){var e=n.room.state;return window.manager?d(d(d({},e),{windowBoxState:window.manager.boxState}),{},{cameraState:window.manager.cameraState,sceneState:window.manager.sceneState},{pageState:window.manager.pageState}):d(d({},e),(0,a.createPageState)(e.sceneState))})),m(this,"getTimeDelay",(function(){return n.room.timeDelay})),m(this,"getPhase",(function(){return n.room.phase})),m(this,"isWritable",(function(){return n.room.isWritable})),m(this,"debugInfo",(function(){try{var e=n.room.screen,t=e.camera,r=e.visionRectangle,o=e.adaptedRectangle,a=e.divElement;return{camera:t,visionRectangle:r,adaptedRectangle:o,divWidth:a.clientWidth,divHeight:a.clientHeight}}catch(e){return{error:e.message}}}))};t.RoomStateBridge=_},5294:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setWhiteboardDivGetter=function(e){U=e},t.registerSDKBridge=function(){var e=new te;(0,s.registerAsyn)("sdk",e),window.newWhiteSdk=e.newWhiteSdk,window.joinRoom=e.joinRoom,window.replayRoom=e.replayRoom,(0,O.addBridgeLogHook)(["sdk"],b.logger)},t.sdkCallbackHandler=void 0;var o,a=n(54505),i=n(20597),s=n(70396),c=n(71895),u=n(44112),l=n(87980),f=n(56868),d=n(25275),p=n(59849),m=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(24496)),g=n(29165),y=n(46640),h=n(25242),v=n(24645),b=n(38789),w=n(51126),S=n(15581),P=n(42470),O=n(28388),k=n(15748),C=(o=n(92710))&&o.__esModule?o:{default:o},M=n(33739),j=n(82969),x=n(39310),E=n(25219),I=n(97839);function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function A(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||N(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=N(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function N(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){J(a,r,o,i,s,"next",e)}function s(e){J(a,r,o,i,s,"throw",e)}i(void 0)}))}}var U,H=void 0,V=void 0,z=void 0,G=new x.Rtc,q=void 0,$=void 0,K=new E.SDKCallbackHandler;t.sdkCallbackHandler=K;var X="whiteboard-native-css",Z="whiteboard-native-font-face";(0,c.setAsyncModuleLoadMode)(c.AsyncModuleLoadMode.StoreAsBase64);function Y(){window.manager?(window.manager.destroy(),window.manager=void 0,V=void 0,z=void 0):V?(V.bindHtmlElement(null),V=void 0):z&&(z.bindHtmlElement(null),z=void 0),window.syncedStore&&(0,I.destroySyncedStore)()}function Q(e,t,n){return ee.apply(this,arguments)}function ee(){return ee=L(regeneratorRuntime.mark((function e(t,n,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.WindowManager.mount(B(B({containerSizeRatio:9/16,chessboard:!0,cursor:!!$},r),{},{container:U(),room:t}));case 2:return o=e.sent,(0,S.addManagerListener)(o,b.logger,n),e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)}))),ee.apply(this,arguments)}var te=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),F(this,"newWhiteSdk",(function(e){var t=e.enableInterrupterAPI?function(e){var t=K.onUrlInterrupter(e);return t.length>0?t:e}:void 0,n=function(){var t=L(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.enableSlideInterrupterAPI){t.next=6;break}return t.next=3,K.slideUrlInterrupter(n);case 3:return r=t.sent,console.log("slideUrlInterrupter",n,r),t.abrupt("return",r.length>0?r:n);case 6:return t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=e.log,o=e.__nativeTags,s=e.__platform,w=e.__netlessUA,S=(e.initializeOriginsStates,e.useMultiViews),P=e.userCursor,O=(e.enableInterrupterAPI,e.routeBackup,e.enableRtcIntercept),k=e.enableImgErrorCallback,C=e.enableIFramePlugin,M=e.enableSyncedStore,j=W(e,["log","__nativeTags","__platform","__netlessUA","initializeOriginsStates","useMultiViews","userCursor","enableInterrupterAPI","routeBackup","enableRtcIntercept","enableImgErrorCallback","enableIFramePlugin","enableSyncedStore"]);(0,b.enableReport)(!!r),q=e,s&&(window.__platform=s),w&&(window.__netlessUA=w.join(" ")),k&&(0,a.hookCreateElement)(),$=P?new i.CursorTool:void 0,o&&(window.__nativeTags=B(B({},window.__nativeTags),o));var x=j.pptParams||{};O&&(x.rtcClient=G,(0,m.usePlugin)(new g.RTCPlugin(G)));var E,I=[],_=R(window.pluginParams||[]);try{for(_.s();!(E=_.n()).done;){var N=E.value,T=F({},N.name,window[N.variable]);I.push(T)}}catch(e){_.e(e)}finally{_.f()}var D=(0,c.createPlugins)(B({video:u.videoPlugin,audio:l.audioPlugin,video2:f.videoPlugin2,audio2:d.audioPlugin2,"video.js":(0,p.videoJsPlugin)({log:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=c.time?(e(),c.time=Math.ceil(t/n)*n):r&&t+n>r.timeDuration&&(e(),c.time=t))}((function(){(0,r.call)("player.onScheduleTimeChanged",e)}),e,u),l&&(0,a.postIframeMessage)({eventName:"onProgressTimeChanged",params:[e]},i.logger)})),s(this,"onCatchErrorWhenAppendFrame",(function(e,t){})),s(this,"onCatchErrorWhenRender",(function(e){(0,r.call)("player.onCatchErrorWhenRender",{error:e.message})})),l=f,u=t,this.onPhaseChanged=function(e){var t=window.player;if(void 0!==t){d(t,e);var s=function(e){c.time=0,(0,r.call)("player.onPhaseChanged",e),l&&(0,a.postIframeMessage)({eventName:"onPhaseChanged",params:[e]},i.logger)};n&&e!==o.PlayerPhase.WaitingFirstFrame&&e!==o.PlayerPhase.Stopped||s(e)}}}},42470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RoomCallbackHandler=void 0;var r=n(38789),o=n(70396),a=n(28388),i=n(71895);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.RoomCallbackHandler=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"onPhaseChanged",(function(e){(0,o.call)("room.firePhaseChanged",e);var t=window.room;t&&t.phase===i.RoomPhase.Reconnecting&&setTimeout((function(){t&&t.phase===i.RoomPhase.Reconnecting&&((0,r.logger)("room start disconnect by reconnecting timeout by bridge"),t.disconnect().then((function(){var e="Reconnect time exceeds ".concat(45e3," milliseconds, sdk call disconnect automatically");(0,r.logger)(e),(0,o.call)("room.fireDisconnectWithError",e)})))}),45e3)})),l(this,"onCanUndoStepsUpdate",(function(e){(0,o.call)("room.fireCanUndoStepsUpdate",e)})),l(this,"onCanRedoStepsUpdate",(function(e){(0,o.call)("room.fireCanRedoStepsUpdate",e)})),l(this,"onRoomStateChanged",(function(e){var t=e,n=t.sceneState,r=u(t,["sceneState"]);window.manager?0!==Object.keys(r).length&&(0,o.call)("room.fireRoomStateChanged",JSON.stringify(r)):(n&&(e=c(c({},e),(0,a.createPageState)(n))),(0,o.call)("room.fireRoomStateChanged",JSON.stringify(e)))})),l(this,"onDisconnectWithError",(function(e){(0,o.call)("room.fireDisconnectWithError",e.message)})),l(this,"onKickedWithReason",(function(e){(0,o.call)("room.fireKickedWithReason",e)})),l(this,"onCatchErrorWhenAppendFrame",(function(e,t){(0,r.logger)("onCatchErrorWhenAppendFrame",[e,t.message]),(0,o.call)("room.fireCatchErrorWhenAppendFrame",{userId:e,error:t.message})})),l(this,"onCatchErrorWhenRender",(function(e){}))}},25219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKCallbackHandler=void 0;var r=n(70396);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.SDKCallbackHandler=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"onPostMessage",(function(e){(0,r.call)("sdk.postMessage",e)})),o(this,"onThrowError",(function(e){(0,r.call)("sdk.throwError",e)})),o(this,"onLogger",(function(e){(0,r.call)("sdk.logger",e)})),o(this,"onUrlInterrupter",(function(e){return(0,r.syncCall)("sdk.urlInterrupter",e)})),o(this,"slideUrlInterrupter",(function(e){return(0,r.asyncCall)("sdk.slideUrlInterrupter",e)})),o(this,"onSetupFail",(function(e){(0,r.call)("sdk.setupFail",{message:e.message,jsStack:e.stack})})),o(this,"onPPTLoadProgress",(function(e,t){})),o(this,"onPPTMediaPlay",(function(e,t){console.log("onPPTMediaPlay"),(0,r.call)("sdk.onPPTMediaPlay",{shapeId:e,type:t})})),o(this,"onPPTMediaPause",(function(e,t){(0,r.call)("sdk.onPPTMediaPause",{shapeId:e,type:t})}))}},51126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertBound=function(e){if(!e)return;return{centerX:e.centerX,centerY:e.centerY,width:e.width,height:e.height,maxContentMode:a(e.maxContentMode),minContentMode:a(e.minContentMode)}};var r=n(71895),o=n(18371);function a(e){if(e){var t=void 0===e.scale?1:e.scale,n=void 0===e.space?0:e.space;o.ScaleMode.Scale;switch("string"==typeof e.mode?parseInt(o.ScaleMode[e.mode]):e.mode){case o.ScaleMode.Scale:return(0,r.contentModeScale)(t);case o.ScaleMode.AspectFill:return(0,r.contentModeAspectFill)();case o.ScaleMode.AspectFillScale:return(0,r.contentModeAspectFillScale)(t);case o.ScaleMode.AspectFit:return(0,r.contentModeAspectFit)();case o.ScaleMode.AspectFitScale:return(0,r.contentModeAspectFitScale)(t);case o.ScaleMode.AspectFitSpace:return(0,r.contentModeAspectFitSpace)(n);default:return}}}},28388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addBridgeLogHook=function(e,t){function n(e){return e.keys&&e.keys()||Object.getOwnPropertyNames(e)}function r(e,t){return e.get&&e.get(t)||e[t]}var o,s=void 0!==window.ReactNativeWebView,c=s?window.bridge.asyncMethods:window.bridge.registerMap.async,u=i(n(c));try{for(u.s();!(o=u.n()).done;){var l=o.value;if(e.includes(l)){var f,d=r(c,l),p=i(Object.getOwnPropertyNames(d));try{var m=function(){var e=f.value,n=d[e];if("function"!=typeof n)return"continue";d[e]=function(){for(var r=arguments.length,o=new Array(r),i=0;i=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n2?n-2:0),s=2;s0&&u()}else{var p=[t].concat(a(f));c.push(p)}l=0===i.length?void 0:1===i.length?i[0]:i.every((function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}))?i.join(" "):i,e&&r.sdkCallbackHandler.onLogger({funName:t,params:l})}},89774:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postIframeMessage=function(e,t){var n={name:"parentWindow",payload:e},r=document.getElementsByTagName("iframe");if(r.length>0&&r[0].contentWindow){r[0].contentWindow.postMessage(n,"*")}else 0==r.length?null==t||t("postmessage fail","no frames exist"):null==t||t("postmessage fail","no conentWindow")}},25893:function(){},75042:function(){},65586:function(){}},function(e){e.O(0,[378,83,791,736],(function(){return t=36037,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/carrot.yml b/carrot.yml index 7c602ec2..1dc715a6 100644 --- a/carrot.yml +++ b/carrot.yml @@ -1,4 +1,4 @@ - name: whiteboard-bridge repoPath: ../whiteboard-bridge repoURL: 'https://github.com/netless-io/whiteboard-bridge.git' - commit: 2d0e463 + commit: 30ccd81