/*!
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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../_virtual/_rollupPluginBabelHelpers.js"),e=require("../../events.js");var t=function(t){r.inherits(n,t);var i=r.createSuper(n);function n(){return r.classCallCheck(this,n),i.apply(this,arguments)}return r.createClass(n,[{key:"afterCreate",value:function(){var r=this;this.clickHandler=this.hook("errorRetry",this.errorRetry,{pre:function(r){r.preventDefault(),r.stopPropagation()}}),this.onError=this.hook("showError",this.handleError),this.bind(".xgplayer-error-refresh","click",this.clickHandler),this.on(e.ERROR,function(e){r.onError(e)})}},{key:"errorRetry",value:function(r){this.emitUserAction(r,"error_retry",{}),this.player.retry()}},{key:"handleError",value:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.player,t=r.errorType,i=e.errorNote?this.i18n[e.errorNote]:"";if(!i)switch(t){case"decoder":i=this.i18n.MEDIA_ERR_DECODE;break;case"network":i=this.i18n.MEDIA_ERR_NETWORK;break;default:i=this.i18n.MEDIA_ERR_SRC_NOT_SUPPORTED}this.find(".xgplayer-error-text").innerHTML=i,this.find(".xgplayer-error-tips").innerHTML="".concat(this.i18n.REFRESH_TIPS,'<span class="xgplayer-error-refresh">').concat(this.i18n.REFRESH,"</span>")}},{key:"destroy",value:function(){this.unbind(".xgplayer-error-refresh","click",this.clickHandler)}},{key:"render",value:function(){return'<xg-error class="xgplayer-error">\n      <div class="xgplayer-errornote">\n       <span class="xgplayer-error-text"></span>\n       <span class="xgplayer-error-tips"><em class="xgplayer-error-refresh"></em></span>\n      </div>\n    </xg-error>'}}],[{key:"pluginName",get:function(){return"error"}}]),n}(require("../../plugin/plugin.js").default);exports.default=t;