/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../_virtual/_rollupPluginBabelHelpers.js"),r=require("../utils/util.js"),t=require("../constant.js");var n=function(){function n(){var t=this;if(e.classCallCheck(this,n),e.defineProperty(this,"__trigger",function(e){var r=(new Date).getTime();t.timeStamp=r;for(var n=0;n<e.length;n++)t.__runHandler(e[n].target)}),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(r.throttle(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(s){console.error(s)}}return e.createClass(n,[{key:"addObserver",value:function(e,r){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(t.PLATER_ID),s=this.__handlers,i=-1,a=0;a<s.length;a++)s[a]&&e===s[a].target&&(i=a);i>-1?this.__handlers[i].handler=r:this.__handlers.push({target:e,handler:r,playerId:n})}}},{key:"unObserver",value:function(e){var r=-1;this.__handlers.map(function(t,n){e===t.target&&(r=n)});try{var t;null===(t=this.observer)||void 0===t||t.unobserve(e)}catch(n){}r>-1&&this.__handlers.splice(r,1)}},{key:"destroyObserver",value:function(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var r=this.__handlers,t=0;t<r.length;t++)if(r[t]&&e===r[t].target){try{r[t].handler(e)}catch(n){console.error(n)}return!0}return!1}}]),n}(),s=null;exports.addObserver=function(e,r){return s||(s=new n),s.addObserver(e,r),s},exports.unObserver=function(e,r){var t;null===(t=s)||void 0===t||t.unObserver(e,r)};