const s=function(e,n){if(n=n||{},!(this instanceof s))return new s(e,n);this.conf={styleStr:"",setDomHeightArr:[],printBeforeFn:null,printDoneCallBack:null};for(const o in this.conf)o&&n.hasOwnProperty(o)&&(this.conf[o]=n[o]);typeof e=="string"?this.dom=document.querySelector(e):this.dom=this.isDOM(e)?e:e.$el,this.conf.setDomHeightArr&&this.conf.setDomHeightArr.length&&this.setDomHeight(this.conf.setDomHeightArr),this.init()};s.prototype={init:function(){const e=this.getStyle()+this.getHtml();this.writeIframe(e)},extendOptions:function(e,n){for(const o in n)e[o]=n[o];return e},getStyle:function(){let e="";const n=document.querySelectorAll("style,link");for(let o=0;o.no-print{display:none;}${this.conf.styleStr}`,e},getHtml:function(){const e=document.querySelectorAll("input"),n=document.querySelectorAll("select"),o=document.querySelectorAll("textarea"),c=document.querySelectorAll("canvas");for(let t=0;t{document.querySelectorAll(n).forEach(c=>{c.style.height=c.offsetHeight+"px"})})}};export{s as P};