1import{K as y,Qb as q,R as j,Rb as H,Sa as G,Sb as B,T as P,e as c,fa as Z,ha as Q,nc as J,xc as K,yc as X}from"./chunk-DCUU6NHZ.js";import{$b as w,Aa as M,Db as f,Lb as O,Na as R,Nb as p,Nc as U,Pb as C,Ub as d,Vb as g,Wb as h,Xb as _,ac as b,ha as D,ib as s,ic as l,ja as N,jd as W,mc as F,md as m,na as r,nc as L,oc as V,uc as A,v as E,w as z,xa as x,xb as T,xc as S,yb as I,yc as v}from"./chunk-RA4DXI5M.js";var ne=["switchElement"];function oe(i,a){i&1&&_(0,"nz-icon",3)}function re(i,a){if(i&1&&(w(0),S(1),b()),i&2){let o=l(2);s(),v(o.nzCheckedChildren)}}function ae(i,a){if(i&1&&f(0,re,2,1,"ng-container",6),i&2){let o=l();d("nzStringTemplateOutlet",o.nzCheckedChildren)}}function se(i,a){if(i&1&&(w(0),S(1),b()),i&2){let o=l(2);s(),v(o.nzUnCheckedChildren)}}function le(i,a){if(i&1&&f(0,se,2,1,"ng-container",6),i&2){let o=l();d("nzStringTemplateOutlet",o.nzUnCheckedChildren)}}var ce="switch",de=(()=>{let i,a=[],o=[];return class u{static{let e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[P()],E(null,null,i,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:t=>"nzSize"in t,get:t=>t.nzSize,set:(t,n)=>{t.nzSize=n}},metadata:e},a,o),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}_nzModuleName=ce;nzConfigService=r(j);el=r(R).nativeElement;ngZone=r(M);cdr=r(W);focusMonitor=r(J);directionality=r(G);destroyRef=r(x);isChecked=!1;onChange=()=>{};onTouched=()=>{};switchElement;nzLoading=!1;nzDisabled=!1;nzControl=!1;nzCheckedChildren=null;nzUnCheckedChildren=null;nzSize=z(this,a,"default");nzId=(z(this,o),null);dir="ltr";isNzDisableFirstChange=!0;updateValue(e){this.isChecked!==e&&(this.isChecked=e,this.onChange(this.isChecked))}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard")}blur(){this.switchElement.nativeElement.blur()}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.switchElement.nativeElement)})}ngOnInit(){this.directionality.change.pipe(c(this.destroyRef)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value,y(this.el,"click").pipe(c(this.destroyRef)).subscribe(e=>{e.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck()})}),y(this.switchElement.nativeElement,"keydown").pipe(c(this.destroyRef)).subscribe(e=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;let{keyCode:t}=e;t!==37&&t!==39&&t!==32&&t!==13||(e.preventDefault(),this.ngZone.run(()=>{t===37?this.updateValue(!1):t===39?this.updateValue(!0):(t===32||t===13)&&this.updateValue(!this.isChecked),this.cdr.markForCheck()}))})}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,!0).pipe(c(this.destroyRef)).subscribe(e=>{e||Promise.resolve().then(()=>this.onTouched())})}writeValue(e){this.isChecked=e,this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}static \u0275fac=function(t){return new(t||u)};static \u0275cmp=T({type:u,selectors:[["nz-switch"]],viewQuery:function(t,n){if(t&1&&F(ne,7),t&2){let k;L(k=V())&&(n.switchElement=k.first)}},inputs:{nzLoading:[2,"nzLoading","nzLoading",m],nzDisabled:[2,"nzDisabled","nzDisabled",m],nzControl:[2,"nzControl","nzControl",m],nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],features:[U([{provide:B,useExisting:D(()=>u),multi:!0}])],decls:8,vars:15,consts:[["switchElement",""],["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],[1,"ant-switch-handle"],["nzType","loading",1,"ant-switch-loading-icon"],[1,"ant-switch-inner"],[1,"ant-click-animating-node"],[4,"nzStringTemplateOutlet"]],template:function(t,n){t&1&&(g(0,"button",1,0)(2,"span",2),p(3,oe,1,0,"nz-icon",3),h(),g(4,"span",4),p(5,ae,1,1,"ng-container")(6,le,1,1,"ng-container"),h(),_(7,"div",5),h()),t&2&&(A("ant-switch-checked",n.isChecked)("ant-switch-loading",n.nzLoading)("ant-switch-disabled",n.nzDisabled)("ant-switch-small",n.nzSize==="small")("ant-switch-rtl",n.dir==="rtl"),d("disabled",n.nzDisabled)("nzWaveExtraNode",!0),O("id",n.nzId),s(3),C(n.nzLoading?3:-1),s(2),C(n.isChecked?5:6))},dependencies:[X,K,Q,Z,H,q],encapsulation:2,changeDetection:0})}})(),Te=(()=>
1{class i{static \u0275fac=function(Y){return new(Y||i)};static \u0275mod=I({type:i});static \u0275inj=N({imports:[de]})}return i})();export{de as a,Te as b};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.