import{Ia as f,Ic as C,La as m,Ma as y,Pb as _,Qb as h,sa as u,ta as p,va as l,xa as s}from"./chunk-O7RN3KYY.js";import{a}from"./chunk-ZE2KCNEA.js";a();var r=class{_document;_textarea;constructor(n,e){this._document=e;let t=this._textarea=this._document.createElement("textarea"),i=t.style;i.position="fixed",i.top=i.opacity="0",i.left="-999em",t.setAttribute("aria-hidden","true"),t.value=n,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t)}copy(){let n=this._textarea,e=!1;try{if(n){let t=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),e=this._document.execCommand("copy"),t&&t.focus()}}catch(t){}return e}destroy(){let n=this._textarea;n&&(n.remove(),this._textarea=void 0)}},g=(()=>{class o{_document=s(f);constructor(){}copy(e){let t=this.beginCopy(e),i=t.copy();return t.destroy(),i}beginCopy(e){return new r(e,this._document)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=u({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),b=new l("CDK_COPY_TO_CLIPBOARD_CONFIG"),M=(()=>{class o{_clipboard=s(g);_ngZone=s(y);text="";attempts=1;copied=new m;_pending=new Set;_destroyed=!1;_currentTimeout;constructor(){let e=s(b,{optional:!0});e&&e.attempts!=null&&(this.attempts=e.attempts)}copy(e=this.attempts){if(e>1){let t=e,i=this._clipboard.beginCopy(this.text);this._pending.add(i);let c=()=>{let d=i.copy();!d&&--t&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(c,1)):(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(d))};c()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(e=>e.destroy()),this._pending.clear(),this._destroyed=!0}static \u0275fac=function(t){return new(t||o)};static \u0275dir=h({type:o,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,i){t&1&&C("click",function(){return i.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}})}return o})(),w=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=_({type:o});static \u0275inj=p({})}return o})();export{g as a,M as b,w as c};