/**
 * Highstock JS v11.2.0 (2023-10-30)
 *
 * Advanced Highcharts Stock tools
 *
 * (c) 2010-2021 Highsoft AS
 * Author: Torstein Honsi
 *
 * License: www.highcharts.com/license
 */!function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/full-screen",["highcharts"],function(n){return e(n),e.Highcharts=n,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var n=e?e._modules:{};function t(e,n,t,r){e.hasOwnProperty(n)||(e[n]=r.apply(null,t),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:n,module:e[n]}})))}t(n,"Extensions/Exporting/Fullscreen.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Utilities.js"]],function(e,n){var t=n.addEvent,r=n.fireEvent,s=[];function i(){this.fullscreen=new o(this)}var o=function(){function o(e){this.chart=e,this.isOpen=!1;var n=e.renderTo;!this.browserProps&&("function"==typeof n.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:n.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:n.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:n.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}return o.compose=function(e){n.pushUnique(s,e)&&t(e,"beforeRender",i)},o.prototype.close=function(){var e=this,n=e.chart,t=n.options.chart;r(n,"fullscreenClose",null,function(){e.isOpen&&e.browserProps&&n.container.ownerDocument instanceof Document&&n.container.ownerDocument[e.browserProps.exitFullscreen](),e.unbindFullscreenEvent&&(e.unbindFullscreenEvent=e.unbindFullscreenEvent()),n.setSize(e.origWidth,e.origHeight,!1),e.origWidth=void 0,e.origHeight=void 0,t.width=e.origWidthOption,t.height=e.origHeightOption,e.origWidthOption=void 0,e.origHeightOption=void 0,e.isOpen=!1,e.setButtonText()})},o.prototype.open=function(){var e=this,n=e.chart,s=n.options.chart;r(n,"fullscreenOpen",null,function(){if(s&&(e.origWidthOption=s.width,e.origHeightOption=s.height),e.origWidth=n.chartWidth,e.origHeight=n.chartHeight,e.browserProps){var r=t(n.container.ownerDocument,e.browserProps.fullscreenChange,function(){e.isOpen?(e.isOpen=!1,e.close()):(n.setSize(null,null,!1),e.isOpen=!0,e.setButtonText())}),i=t(n,"destroy",r);e.unbindFullscreenEvent=function(){r(),i()};var o=n.renderTo[e.browserProps.requestFullscreen]();o&&o.catch(function(){alert("Full screen is not supported inside a frame.")})}})},o.prototype.setButtonText=function(){var n=this.chart,t=n.exportDivElements,r=n.options.exporting,s=r&&r.buttons&&r.buttons.contextButton.menuItems,i=n.options.lang;if(r&&r.menuItemDefinitions&&i&&i.exitFullscreen&&i.viewFullscreen&&s&&t){var o=t[s.indexOf("viewFullscreen")];o&&e.setElementHTML(o,this.isOpen?i.exitFullscreen:r.menuItemDefinitions.viewFullscreen.text||i.viewFullscreen)}},o.prototype.toggle=function(){this.isOpen?this.close():this.open()},o}();return o}),t(n,"masters/modules/full-screen.src.js",[n["Core/Globals.js"],n["Extensions/Exporting/Fullscreen.js"]],function(e,n){e.Fullscreen=n,n.compose(e.Chart)})});//# sourceMappingURL=full-screen.js.map