text: Object.defineProperty(exports,"__esModule",{value:!0}),exports.HaxDialogBehaviors=exports.HaxDialog=void 0;var e=require("lit");function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _templateObject3_ff7fffa0941711ec8d52c707f928eca0(){var e=_taggedTemplateLiteral(["\n          :host {\n            display: none;\n          }\n          simple-modal-template {\n            display: none;\n            --simple-modal-z-index: 100000001;\n            --simple-modal-resize: horizontal;\n            --simple-modal-width: auto;\n            --simple-modal-height: auto;\n            --simple-modal-min-width: 95vw;\n            --simple-modal-min-height: 95vh;\n            --simple-modal-max-width: unset;\n            --simple-modal-max-height: unset;\n            --simple-modal-titlebar-color: black;\n            --simple-modal-titlebar-background: #ddd;\n            --simple-modal-header-color: black;\n            --simple-modal-header-background: #ccc;\n            --simple-modal-content-container-color: black;\n            --simple-modal-content-container-background: #ffffff;\n            --simple-modal-buttons-color: blue;\n            --simple-modal-buttons-background: #fff;\n            --simple-modal-button-color: var(--simple-modal-buttons-color);\n            --simple-modal-button-background: var(\n              --simple-modal-buttons-background-color\n            );\n          }\n        "]);return _templateObject3_ff7fffa0941711ec8d52c707f928eca0=function _templateObject3_ff7fffa0941711ec8d52c707f928eca0(){return e},e}function _templateObject2_ff7fffa0941711ec8d52c707f928eca0(){var e=_taggedTemplateLiteral([""]);return _templateObject2_ff7fffa0941711ec8d52c707f928eca0=function _templateObject2_ff7fffa0941711ec8d52c707f928eca0(){return e},e}function _templateObject_ff7fffa0941711ec8d52c707f928eca0(){var e=_taggedTemplateLiteral(['\n        <simple-modal-template\n          modal-id="hax-export"\n          id="dialog"\n          .title="','"\n        >\n          <hax-view-source slot="content"></hax-view-source>\n        </simple-modal-template>\n      ']);return _templateObject_ff7fffa0941711ec8d52c707f928eca0=function _templateObject_ff7fffa0941711ec8d52c707f928eca0(){return e},e}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _inherits(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&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _get(e,t,o){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,o){var n=function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(o):r.value}},_get(e,t,o||e)}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}require("@lrnwebcomponents/simple-modal/lib/simple-modal-template.js"),require("./hax-view-source.js");var t=function HaxDialogBehaviors(t){return function(t){function _class(){var e;return _classCallCheck(this,_class),(e=_possibleConstructorReturn(this,_getPrototypeOf(_class).call(this))).title="View page source",e}return _inherits(_class,t),function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),e}(_class,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(_class.prototype),"connectedCallback",this).call(this),window.addEventListener("simple-modal-show",this.modalToggle.bind(this))}},{key:"disconnectedCallback",value:function disconnectedCallback(){window.removeEventListener("simple-modal-show",this.modalToggle.bind(this)),_get(_getPrototypeOf(_class.prototype),"disconnectedCallback",this).call(this)}},{key:"modalToggle",value:function modalToggle(e){"hax-export"==e.detail.id&&e.detail.elements.content.children[0].openSource()}},{key:"render",value:function render(){return(0,e.html)(_templateObject_ff7fffa0941711ec8d52c707f928eca0(),this.title)}},{key:"firstUpdated",value:function firstUpdated(){this.dispatchEvent(new CustomEvent("hax-register-core-piece",{bubbles:!0,cancelable:!0,composed:!0,detail:{piece:"haxExport",object:this}}))}},{key:"content",get:function get(){return(0,e.html)(_templateObject2_ff7fffa0941711ec8d52c707f928eca0())}}],[{key:"styles",get:function get(){return[(0,e.css)(_templateObject3_ff7fffa0941711ec8d52c707f928eca0())]}},{key:"tag",get:function get(){return"hax-export-dialog"}},{key:"properties",get:function get(){return{title:{type:String}}}}]),_class}(t)};exports.HaxDialogBehaviors=t;var o=function(o){function HaxDialog(){return _classCallCheck(this,HaxDialog),_possibleConstructorReturn(this,_getPrototypeOf(HaxDialog).apply(this,arguments))}return _inherits(HaxDialog,t(e.LitElement)),HaxDialog}();exports.HaxDialog=o,window.customElements.define(o.tag,o);