PageSourceSearch

https://abctalkies.com/230.d7faeff803d81142.js

js abctalkies.com collected 2026-09-24 11:01:20 UTC 50,014 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkabctalkies=self.webpackChunkabctalkies||[]).push([[230],{72243:(N,W,M)=>{M.d(W,{T:()=>f});var h=M(54438);let f=(()=>{var a;class k{constructor(){}convertBlobToBase64(T){return new Promise((P,_)=>{const C=new FileReader;C.onloadend=()=>P(C.result),C.onerror=_,C.readAsDataURL(T)})}}return(a=k).\u0275fac=function(T){return new(T||a)},a.\u0275prov=h.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}),k})()},37038:(N,W,M)=>{M.d(W,{H:()=>k,_:()=>a});var h=M(54438),f=M(60177);let a=(()=>{var b;class T{constructor(_,C,B){this.el=_,this.vcr=C,this.renderer=B,this.dtOptions={}}ngOnInit(){this.dtTrigger?this.dtTrigger.subscribe(_=>{this.displayTable(_)}):this.displayTable(null)}ngOnDestroy(){this.dtTrigger&&this.dtTrigger.unsubscribe(),this.dt&&this.dt.destroy(!0)}displayTable(_){_&&(this.dtOptions=_),this.dtInstance=new Promise((C,B)=>{Promise.resolve(this.dtOptions).then(v=>{0!==Object.keys(v).length||0!==$("tbody tr",this.el.nativeElement).length?(v.columns&&v.columns.forEach(u=>{var m;""===(null!==(m=u.id)&&void 0!==m?m:"").trim()&&(u.id=this.getColumnUniqueId())}),setTimeout(()=>{let u={rowCallback:(m,l,p)=>{if(v.columns){const R=v.columns;this.applyNgPipeTransform(m,R),this.applyNgRefTemplate(m,R,l)}v.rowCallback&&v.rowCallback(m,l,p)}};u=Object.assign({},v,u),this.dt=$(this.el.nativeElement).DataTable(u),C(this.dt)})):B("Both the table and dtOptions cannot be empty")})})}applyNgPipeTransform(_,C){C.filter(v=>v.ngPipeInstance&&!v.ngTemplateRef).forEach(v=>{const g=v.ngPipeInstance,u=v.ngPipeArgs||[],m=C.filter(O=>!1!==O.visible).findIndex(O=>O.id===v.id),l=_.childNodes.item(m),p=$(l).text(),R=g.transform(p,...u);$(l).text(R)})}applyNgRefTemplate(_,C,B){C.filter(g=>g.ngTemplateRef&&!g.ngPipeInstance).forEach(g=>{const{ref:u,context:m}=g.ngTemplateRef,l=C.filter(F=>!1!==F.visible).findIndex(F=>F.id===g.id),p=_.childNodes.item(l);$(p).html("");const R=Object.assign({},m,null==m?void 0:m.userData,{adtData:B}),O=this.vcr.createEmbeddedView(u,R);this.renderer.appendChild(p,O.rootNodes[0])})}getColumnUniqueId(){let _="";for(let B=0;B<6;B++){const v=Math.floor(62*Math.random());_+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(v)}return _.trim()}}return(b=T).\u0275fac=function(_){return new(_||b)(h.rXU(h.aKT),h.rXU(h.c1b),h.rXU(h.sFG))},b.\u0275dir=h.FsC({type:b,selectors:[["","datatable",""]],inputs:{dtOptions:"dtOptions",dtTrigger:"dtTrigger"}}),T})(),k=(()=>{var b;class T{}return(b=T).\u0275fac=function(_){return new(_||b)},b.\u0275mod=h.$C({type:b}),b.\u0275inj=h.G2t({imports:[f.MD]}),T})()},47820:(N,W,M)=>{M.d(W,{Hq:()=>v,eh:()=>B});var h=M(54438),f=M(60177);const a=["*"];function k(g,u){1&g&&h.eu8(0)}function b(g,u){if(1&g&&(h.j41(0,"bar",3),h.SdG(1),h.k0s()),2&g){const m=h.XpG();h.Y8G("type",m.type)("value",m._value)("max",m.max)("animate",m.animate)("striped",m.striped)}}function T(g,u){if(1&g&&(h.j41(0,"bar",3),h.EFF(1),h.k0s()),2&g){const m=u.$implicit,l=h.XpG(2);h.Y8G("type",m.type)("value",m.value)("max",m.max||l.max)("animate",l.animate)("striped",l.striped),h.R7$(),h.JRh(m.label)}}function P(g,u){if(1&g&&h.DNE(0,T,2,6,"bar",4),2&g){const m=h.XpG();h.Y8G("ngForOf",m._values)}}let _=(()=>{var g;class u{constructor(l,p){this.el=l,this.renderer=p,this.max=100,this.value=0,this.animate=!1,this.striped=!1,this.type="info",this.percent=100}ngOnChanges(l){var p,R;(l.value||l.max)&&(this.percent=Number((null===(p=l.value)||void 0===p?void 0:p.currentValue)||this.value)/Number((null===(R=l.max)||void 0===R?void 0:R.currentValue)||this.max||100)*100),l.type&&this.applyTypeClasses()}applyTypeClasses(){if(this._prevType){const l="progress-bar-".concat(this._prevType),p="bg-".concat(this._prevType);this.renderer.removeClass(this.el.nativeElement,l),this.renderer.removeClass(this.el.nativeElement,p),this._prevType=void 0}if(this.type){const l="progress-bar-".concat(this.type),p="bg-".concat(this.type);this.renderer.addClass(this.el.nativeElement,l),this.renderer.addClass(this.el.nativeElement,p),this._prevType=this.type}}}return(g=u).\u0275fac=function(l){return new(l||g)(h.rXU(h.aKT),h.rXU(h.sFG))},g.\u0275cmp=h.VBU({type:g,selectors:[["bar"]],hostAttrs:["role","progressbar","aria-valuemin","0"],hostVars:13,hostBindings:function(l,p){2&l&&(h.BMQ("aria-valuenow",p.value)("aria-valuetext",p.percent?p.percent.toFixed(0)+"%":"")("aria-valuemax",p.max),h.xc7("height","100","%")("width",p.percent,"%"),h.AVh("progress-bar",!0)("progress-bar-animated",p.animate)("progress-bar-striped",p.striped))}
1,inputs:{max:"max",value:"value",animate:"animate",striped:"striped",type:"type"},features:[h.OA$],ngContentSelectors:a,decls:1,vars:0,template:function(l,p){1&l&&(h.NAR(),h.SdG(0))},encapsulation:2,changeDetection:0}),u})(),C=(()=>{var g;class u{constructor(){this.animate=!1,this.max=100}}return(g=u).\u0275fac=function(l){return new(l||g)},g.\u0275prov=h.jDH({token:g,factory:g.\u0275fac,providedIn:"root"}),u})(),B=(()=>{var g;class u{set value(l){this.isStacked=Array.isArray(l),"number"==typeof l?(this._value=l,this._values=void 0):(this._value=void 0,this._values=l)}constructor(l){this.max=100,this.animate=!1,this.striped=!1,this.isStacked=!1,this._value=0,Object.assign(this,l)}}return(g=u).\u0275fac=function(l){return new(l||g)(h.rXU(C))},g.\u0275cmp=h.VBU({type:g,selectors:[["progressbar"]],hostVars:3,hostBindings:function(l,p){2&l&&(h.BMQ("max",p.max),h.AVh("progress",!0))},inputs:{max:"max",animate:"animate",striped:"striped",type:"type",value:"value"},ngContentSelectors:a,decls:5,vars:3,consts:[["NotStacked",""],["Stacked",""],[4,"ngIf","ngIfThen","ngIfElse"],[3,"type","value","max","animate","striped"],[3,"type","value","max","animate","striped",4,"ngFor","ngForOf"]],template:function(l,p){if(1&l&&(h.NAR(),h.DNE(0,k,1,0,"ng-container",2)(1,b,2,5,"ng-template",null,0,h.C5r)(3,P,1,1,"ng-template",null,1,h.C5r)),2&l){const R=h.sdS(2),O=h.sdS(4);h.Y8G("ngIf",!p.isStacked)("ngIfThen",R)("ngIfElse",O)}},dependencies:[f.Sq,f.bT,_],styles:["[_nghost-%COMP%]{width:100%;display:flex}"],changeDetection:0}),u})(),v=(()=>{var g;class u{static forRoot(){return{ngModule:u,providers:[]}}}return(g=u).\u0275fac=function(l){return new(l||g)},g.\u0275mod=h.$C({type:g}),g.\u0275inj=h.G2t({imports:[f.MD]}),u})()},99362:(N,W,M)=>{M.d(W,{_D:()=>xt});var h=M(10467),f=M(89379),a=M(54438),k=M(56977),b=M(61594),T=M(21413),P=M(57786),_=M(33726),C=M(60177),B=M(345);const v=["wrapper"],g=["sourceImage"];function u(o,e){if(1&o){const n=a.RV6();
1a.j41(0,"img",5,0),a.bIt("load",function(){a.eBV(n);const i=a.XpG();return a.Njj(i.imageLoadedInView())})("mousedown",function(i){a.eBV(n);const s=a.XpG();return a.Njj(s.startMove(i,s.moveTypes.Drag))})("touchstart",function(i){a.eBV(n);const s=a.XpG();return a.Njj(s.startMove(i,s.moveTypes.Drag))})("error",function(i){a.eBV(n);const s=a.XpG();return a.Njj(s.loadImageError(i))}),a.k0s()}if(2&o){const n=e.ngIf,t=a.XpG();a.xc7("visibility",t.imageVisible?"visible":"hidden")("transform",t.safeTransformStyle),a.AVh("ngx-ic-draggable",!t.disabled&&t.allowMoveImage),a.Y8G("src",n,a.B4B),a.BMQ("alt",t.imageAltText)}}function m(o,e){if(1&o){const n=a.RV6();a.qex(0),a.j41(1,"span",9),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"topleft"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"topleft"))}),a.nrm(2,"span",10),a.k0s(),a.j41(3,"span",11),a.nrm(4,"span",10),a.k0s(),a.j41(5,"span",12),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"topright"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"topright"))}),a.nrm(6,"span",10),a.k0s(),a.j41(7,"span",13),a.nrm(8,"span",10),a.k0s(),a.j41(9,"span",14),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"bottomright"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"bottomright"))}),a.nrm(10,"span",10),a.k0s(),a.j41(11,"span",15),a.nrm(12,"span",10),a.k0s(),a.j41(13,"span",16),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"bottomleft"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"bottomleft"))}),a.nrm(14,"span",10),a.k0s(),a.j41(15,"span",17),a.nrm(16,"span",10),a.k0s(),a.j41(17,"span",18),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"top"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"top"))}),a.k0s(),a.j41(18,"span",19),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"right"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"right"))}),a.k0s(),a.j41(19,"span",20),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"bottom"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"bottom"))}),a.k0s(),a.j41(20,"span",21),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"left"))})("touchstart",function(i){a.eBV(n);const s=a.XpG(2);return a.Njj(s.startMove(i,s.moveTypes.Resize,"left"))}),a.k0s(),a.bVm()}}function l(o,e){if(1&o){const n=a.RV6();a.j41(0,"div",6),a.bIt("keydown",function(i){a.eBV(n);const s=a.XpG();return a.Njj(s.keyboardAccess(i))}),a.j41(1,"div",7),a.bIt("mousedown",function(i){a.eBV(n);const s=a.XpG();return a.Njj(s.startMove(i,s.moveTypes.Move))})("touchstart",function(i){a.eBV(n);const s=a.XpG();return a.Njj(s.startMove(i,s.moveTypes.Move))}),a.k0s(),a.DNE(2,m,21,0,"ng-container",8),a.k0s()}if(2&o){const n=a.XpG();a.xc7("top",n.state.cropper.y1,"px")("left",n.state.cropper.x1,"px")("width",n.state.cropper.x2-n.state.cropper.x1,"px")("height",n.state.cropper.y2-n.state.cropper.y1,"px")("margin-left","center"===n.state.options.alignImage?n.marginLeft:null)("visibility",n.imageVisible?"visible":"hidden"),a.AVh("ngx-ic-round",n.state.options.roundCropper),a.BMQ("aria-label",n.state.options.cropperFrameAriaLabel),a.R7$(2),a.Y8G("ngIf",!(n.state.options.hideResizeSquares||n.state.options.cropperStaticWidth&&n.state.options.cropperStaticHeight))}}function p(o,e,n){return o=function R(o,e){let n=o.x2-o.x1,t=o.y2-o.y1;const i=o.x1+n/2,s=o.y1+t/2;e.options.cropperStaticHeight&&e.options.cropperStaticWidth?(n=e.maxSize.width>e.options.cropperStaticWidth?e.options.cropperStaticWidth:e.maxSize.width,t=e.maxSize.height>e.options.cropperStaticHeight?e.options.cropperStaticHeight:e.maxSize.height):(n=Math.max(e.cropperScaledMinWidth,Math.min(n,e.cropperScaledMaxWidth,e.maxSize.width)),t=Math.max(e.cropperScaledMinHeight,Math.min(t,e.cropperScaledMaxHeight,e.maxSize.height)),e.o
1ptions.maintainAspectRatio&&(e.maxSize.width/e.options.aspectRatio<e.maxSize.height?t=n/e.options.aspectRatio:n=t*e.options.aspectRatio));const r=i-n/2,d=s-t/2;return{x1:r,x2:r+n,y1:d,y2:d+t}}(o,e),O(o,e,n)}function O(o,e,n=!1){return o.x1<0&&(o=(0,f.A)((0,f.A)({},o),{},{x1:0,x2:o.x2-(n?o.x1:0)})),o.y1<0&&(o=(0,f.A)((0,f.A)({},o),{},{y2:o.y2-(n?o.y1:0),y1:0})),o.x2>e.maxSize.width&&(o=(0,f.A)((0,f.A)({},o),{},{x1:o.x1-(n?o.x2-e.maxSize.width:0),x2:e.maxSize.width})),o.y2>e.maxSize.height&&(o=(0,f.A)((0,f.A)({},o),{},{y1:o.y1-(n?o.y2-e.maxSize.height:0),y2:e.maxSize.height})),o}function q(o,e,n){const t=(0,f.A)({},n.cropper),i=V(o)-e.clientX,s=S(o)-e.clientY;switch(e.position){case"left":t.x1=Math.min(Math.max(e.cropper.x1+i,t.x2-n.cropperScaledMaxWidth),t.x2-n.cropperScaledMinWidth);break;case"topleft":t.x1=Math.min(Math.max(e.cropper.x1+i,t.x2-n.cropperScaledMaxWidth),t.x2-n.cropperScaledMinWidth),t.y1=Math.min(Math.max(e.cropper.y1+s,t.y2-n.cropperScaledMaxHeight),t.y2-n.cropperScaledMinHeight);break;case"top":t.y1=Math.min(Math.max(e.cropper.y1+s,t.y2-n.cropperScaledMaxHeight),t.y2-n.cropperScaledMinHeight);break;case"topright":t.x2=Math.max(Math.min(e.cropper.x2+i,t.x1+n.cropperScaledMaxWidth),t.x1+n.cropperScaledMinWidth),t.y1=Math.min(Math.max(e.cropper.y1+s,t.y2-n.cropperScaledMaxHeight),t.y2-n.cropperScaledMinHeight);break;case"right":t.x2=Math.max(Math.min(e.cropper.x2+i,t.x1+n.cropperScaledMaxWidth),t.x1+n.cropperScaledMinWidth);break;case"bottomright":t.x2=Math.max(Math.min(e.cropper.x2+i,t.x1+n.cropperScaledMaxWidth),t.x1+n.cropperScaledMinWidth),t.y2=Math.max(Math.min(e.cropper.y2+s,t.y1+n.cropperScaledMaxHeight),t.y1+n.cropperScaledMinHeight);break;case"bottom":t.y2=Math.max(Math.min(e.cropper.y2+s,t.y1+n.cropperScaledMaxHeight),t.y1+n.cropperScaledMinHeight);break;case"bottomleft":t.x1=Math.min(Math.max(e.cropper.x1+i,t.x2-n.cropperScaledMaxWidth),t.x2-n.cropperScaledMinWidth),t.y2=Math.max(Math.min(e.cropper.y2+s,t.y1+n.cropperScaledMaxHeight),t.y1+n.cropperScaledMinHeight);break;case"center":const r="scale"in o?o.scale:1,c=Math.min(Math.max(n.cropperScaledMinWidth,Math.abs(e.cropper.x2-e.cropper.x1)*r),n.cropperScaledMaxWidth),d=Math.min(Math.max(n.cropperScaledMinHeight,Math.abs(e.cropper.y2-e.cropper.y1)*r),n.cropperScaledMaxHeight);t.x1=e.clientX-c/2,t.x2=e.clientX+c/2,t.y1=e.clientY-d/2,t.y2=e.clientY+d/2,t.x1<0?(t.x2-=t.x1,t.x1=0):t.x2>n.maxSize.width&&(t.x1-=t.x2-n.maxSize.width,t.x2=n.maxSize.width),t.y1<0?(t.y2-=t.y1,t.y1=0):t.y2>n.maxSize.height&&(t.y1-=t.y2-n.maxSize.height,t.y2=n.maxSize.height)}return n.options.maintainAspectRatio?function ot(o,e,n){e=(0,f.A)({},e);let t=0,i=0;switch(o){case"top":e.x2=e.x1+(e.y2-e.y1)*n.options.aspectRatio,t=Math.max(e.x2-n.maxSize.width,0),i=Math.max(0-e.y1,0),(t>0||i>0)&&(e.x2-=i*n.options.aspectRatio>t?i*n.options.aspectRatio:t,e.y1+=i*n.options.aspectRatio>t?i:t/n.options.aspectRatio);break;case"bottom":e.x2=e.x1+(e.y2-e.y1)*n.options.aspectRatio,t=Math.max(e.x2-n.maxSize.width,0),i=Math.max(e.y2-n.maxSize.height,0),(t>0||i>0)&&(e.x2-=i*n.options.aspectRatio>t?i*n.options.aspectRatio:t,e.y2-=i*n.options.aspectRatio>t?i:t/n.options.aspectRatio);break;case"topleft":e.y1=e.y2-(e.x2-e.x1)/n.options.aspectRatio,t=Math.max(0-e.x1,0),i=Math.max(0-e.y1,0),(t>0||i>0)&&(e.x1+=i*n.options.aspectRatio>t?i*n.options.aspectRatio:t,e.y1+=i*n.options.aspectRatio>t?i:t/n.options.aspectRatio);break;case"topright":e.y1=e.y2-(e.x2-e.x1)/n.options.aspectRatio,t=Math.max(e.x2-n.maxSize.width,0),i=Math.max(0-e.y1,0),(t>0||i>0)&&(e.x2-=i*n.options.aspectRatio>t?i*n.options.aspectRatio:t,e.y1+=i*n.options.aspectRatio>t?i:t/n.options.aspectRatio);break;case"right":case"bottomright":e.y2=e.y1+(e.x2-e.x1)/n.options.aspectRatio,t=Math.max(e.x2-n.maxSize.width,0),i=Math.max(e.y2-n.maxSize.height,0),(t>0||i>0)&&(e.x2-=i*n.options.aspectRatio>t?i*n.options.aspectRatio:t,e.y2-=i*n.options.aspectRatio>t?i:t/n.options.aspectRatio);break;case"left":case"bottomleft":e.y2=e.y1+(e.x2-e.x1)/n.options.aspectRatio,t=Math.max(0-e.x1,0),i=Math.max(e.y2-n.maxSize.height,0),(t>0||i>0)&&(e.x1+=i*n.options.aspectRatio>t?i*n.options.aspectRatio:t,e.y2-=i*n.options.aspectRatio>t?i:t/n.options.aspectRatio);break;case"center":e.x2=e.x1+(e.y2-e.y1)*n.options.aspectRatio,e.y2=e.y1+(e.x2-e.x1)/n.options.aspectRatio;const s=Math.max(0-e.x1,0),r=Math.max(e.x2-n.maxSize.width,0),c=Math.max(e.y2-n.maxSize.height,0),d=Math.max(0-e.y1,0);(s>0||r>
10||c>0||d>0)&&(e.x1+=c*n.options.aspectRatio>s?c*n.options.aspectRatio:s,e.x2-=d*n.options.aspectRatio>r?d*n.options.aspectRatio:r,e.y1+=d*n.options.aspectRatio>r?d:r/n.options.aspectRatio,e.y2-=c*n.options.aspectRatio>s?c:s/n.options.aspectRatio)}return e}(e.position,t,n):t}function V(o){return"touches"in o&&o.touches[0]?o.touches[0].clientX:"clientX"in o?o.clientX:0}function S(o){return"touches"in o&&o.touches[0]?o.touches[0].clientY:"clientX"in o?o.clientY:0}class rt{constructor(){this.options={format:"png",output:"blob",autoCrop:!0,maintainAspectRatio:!0,aspectRatio:1,resetCropOnAspectRatioChange:!0,resizeToWidth:0,resizeToHeight:0,cropperMinWidth:0,cropperMinHeight:0,cropperMaxHeight:0,cropperMaxWidth:0,cropperStaticWidth:0,cropperStaticHeight:0,canvasRotation:0,roundCropper:!1,onlyScaleDown:!1,imageQuality:92,backgroundColor:null,containWithinAspectRatio:!1,hideResizeSquares:!1,alignImage:"center",cropperFrameAriaLabel:void 0,checkImageType:!0},this.cropper={x1:0,x2:0,y1:0,y2:0},this.transform={},this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.cropperScaledMaxWidth=20,this.cropperScaledMaxHeight=20,this.stepSize=3}setOptionsFromChanges(e){var n;null!==(n=e.options)&&void 0!==n&&n.currentValue&&this.setOptions(e.options.currentValue);const t=Object.entries(e).filter(([i])=>i in this.options).reduce((i,[s,r])=>(0,f.A)((0,f.A)({},i),{},{[s]:r.currentValue}),{});Object.keys(t).length>0&&this.setOptions(t)}setOptions(e){var n;if(this.options=(0,f.A)((0,f.A)({},this.options),e||{}),this.validateOptions(),null===(n=this.loadedImage)||void 0===n||!n.transformed.image.complete||!this.maxSize)return;let t=!1;this.options.maintainAspectRatio&&e.aspectRatio||e.maintainAspectRatio?(this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.options.maintainAspectRatio&&(this.options.resetCropOnAspectRatioChange||!this.aspectRatioIsCorrect())&&(this.cropper=this.maxSizeCropperPosition(),t=!0)):((e.cropperMinWidth||e.cropperMinHeight)&&(this.setCropperScaledMinSize(),t=!0),(e.cropperMaxWidth||e.cropperMaxHeight)&&(this.setCropperScaledMaxSize(),t=!0),(e.cropperStaticWidth||e.cropperStaticHeight)&&(t=!0)),t&&(this.cropper=p(this.cropper,this,!1))}validateOptions(){if(this.options.maintainAspectRatio&&!this.options.aspectRatio)throw new Error("`aspectRatio` should > 0 when `maintainAspectRatio` is enabled")}setMaxSize(e,n){this.maxSize={width:e,height:n},this.setCropperScaledMinSize(),this.setCropperScaledMaxSize()}setCropperScaledMinSize(){var e;null!==(e=this.loadedImage)&&void 0!==e&&e.transformed.size?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.cropperScaledMinWidth=this.options.cropperMinWidth>0?Math.max(20,this.options.cropperMinWidth/this.loadedImage.transformed.size.width*this.maxSize.width):20}setCropperScaledMinHeight(){this.cropperScaledMinHeight=this.options.maintainAspectRatio?Math.max(20,this.cropperScaledMinWidth/this.options.aspectRatio):this.options.cropperMinHeight>0?Math.max(20,this.options.cropperMinHeight/this.loadedImage.transformed.size.height*this.maxSize.height):20}setCropperScaledMaxSize(){var e;if(null!==(e=this.loadedImage)&&void 0!==e&&e.transformed.size){const n=this.loadedImage.transformed.size.width/this.maxSize.width;this.cropperScaledMaxWidth=this.options.cropperMaxWidth>20?this.options.cropperMaxWidth/n:this.maxSize.width,this.cropperScaledMaxHeight=this.options.cropperMaxHeight>20?this.options.cropperMaxHeight/n:this.maxSize.height,this.options.maintainAspectRatio&&(this.cropperScaledMaxWidth>this.cropperScaledMaxHeight*this.options.aspectRatio?this.cropperScaledMaxWidth=this.cropperScaledMaxHeight*this.options.aspectRatio:this.cropperScaledMaxWidth<this.cropperScaledMaxHeight*this.options.aspectRatio&&(this.cropperScaledMaxHeight=this.cropperScaledMaxWidth/this.options.aspectRatio))}else this.cropperScaledMaxWidth=this.maxSize.width,this.cropperScaledMaxHeight=this.maxSize.height}equalsCropperPosition(e){return null==this.cropper&&null==e||null!=this.cropper&&null!=e&&this.cropper.x1.toFixed(3)===e.x1.toFixed(3)&&this.cropper.y1.toFixed(3)===e.y1.toFixed(3)&&this.cropper.x2.toFixed(3)===e.x2.toFixed(3)&&this.cropper.y2.toFixed(3)===e.y2.toFixed(3)}equalsTransformTranslate(e){var n,t,i,s;return(null!==(n=this.transform.translateH)&&void 0!==n?n:0)===(null!==(t=e.translateH)&&void 0!==t?t:0)&&(null!==(i=this.transform.translateV)&&void 0!==i?i:0)===(null!==(s=e.translateV)&&void 0!==s?s:0)}equalsTransform(e){var n,t,i,s,r,c,d,x;return this.equalsTransformTranslate(e)&&(null!==(n=this.transform.scale)&&void 0!==n?n:1)===(null!==(t=e.scale)&&void 0!==t?t:1)&&(null!==(i=this.transform.rotate)&&void 0!==i?i:0)===(null!==(s=e.rotate)&&void 0!==s?s:0)&&(null!==(r=this.transform.flipH)&&void 0!==r&&r)===(null!==(c=e.flipH)&&void 0!==c&&c)&&
1(null!==(d=this.transform.flipV)&&void 0!==d&&d)===(null!==(x=e.flipV)&&void 0!==x&&x)}aspectRatioIsCorrect(){return(this.cropper.x2-this.cropper.x1)/(this.cropper.y2-this.cropper.y1)===this.options.aspectRatio}resizeCropperPosition(e){this.cropper&&(e.width!==this.maxSize.width||e.height!==this.maxSize.height)&&(this.cropper={x1:this.cropper.x1*this.maxSize.width/e.width,x2:this.cropper.x2*this.maxSize.width/e.width,y1:this.cropper.y1*this.maxSize.height/e.height,y2:this.cropper.y2*this.maxSize.height/e.height})}maxSizeCropperPosition(){return{x1:0,y1:0,x2:this.maxSize.width,y2:this.maxSize.height}}}var E=function(o){return o.Drag="drag",o.Move="move",o.Resize="resize",o.Pinch="pinch",o}(E||{});function J(o,e){return o/100*e}class ct{crop(e,n){const t=this.getImagePosition(e),i=t.x2-t.x1,s=t.y2-t.y1,r=document.createElement("canvas");r.width=i,r.height=s;const c=r.getContext("2d");if(!c)return null;null!=e.options.backgroundColor&&(c.fillStyle=e.options.backgroundColor,c.fillRect(0,0,i,s));const d=(e.transform.scale||1)*(e.transform.flipH?-1:1),x=(e.transform.scale||1)*(e.transform.flipV?-1:1),{translateH:I,translateV:y}=this.getCanvasTranslate(e),w=e.loadedImage.transformed;c.setTransform(d,0,0,x,w.size.width/2+I,w.size.height/2+y),c.translate(-t.x1/d,-t.y1/x),c.rotate((e.transform.rotate||0)*Math.PI/180),c.drawImage(w.image,-w.size.width/2,-w.size.height/2);const A={width:i,height:s,imagePosition:t,cropperPosition:(0,f.A)({},e.cropper)};e.options.containWithinAspectRatio&&(A.offsetImagePosition=this.getOffsetImagePosition(e));const z=this.getResizeRatio(i,s,e.options);return 1!==z&&(A.width=Math.round(i*z),A.height=e.options.maintainAspectRatio?Math.round(A.width/e.options.aspectRatio):Math.round(s*z),function ht(o,e,n){const t=o.width,i=o.height,s=t/(e=Math.round(e)),r=i/(n=Math.round(n)),c=Math.ceil(s/2),d=Math.ceil(r/2),x=o.getContext("2d");if(x){const I=x.getImageData(0,0,t,i),y=x.createImageData(e,n),w=I.data,A=y.data;for(let z=0;z<n;z++)for(let D=0;D<e;D++){const L=4*(D+z*e),Mt=z*r;let j=0,Q=0,Z=0,tt=0,et=0,it=0,nt=0;const vt=Math.floor(D*s),Ct=Math.floor(z*r);let Y=Math.ceil((D+1)*s),K=Math.ceil((z+1)*r);Y=Math.min(Y,t),K=Math.min(K,i);for(let X=Ct;X<K;X++){const at=Math.abs(Mt-X)/d,yt=D*s,At=at*at;for(let G=vt;G<Y;G++){const st=Math.abs(yt-G)/c,H=Math.sqrt(At+st*st);if(H>=1)continue;j=2*H*H*H-3*H*H+1;const U=4*(G+X*t);nt+=j*w[U+3],Z+=j,w[U+3]<255&&(j=j*w[U+3]/250),tt+=j*w[U],et+=j*w[U+1],it+=j*w[U+2],Q+=j}}A[L]=tt/Q,A[L+1]=et/Q,A[L+2]=it/Q,A[L+3]=nt/Z}o.width=e,o.height=n,x.putImageData(y,0,0)}}(r,A.width,A.height)),"blob"===n?this.cropToBlob(A,r,e):(A.base64=r.toDataURL("image/"+e.options.format,this.getQuality(e.options)),A)}cropToBlob(e,n,t){var i=this;return(0,h.A)(function*(){return e.blob=yield new Promise(s=>n.toBlob(s,"image/"+t.options.format,i.getQuality(t.options))),e.blob&&(e.objectUrl=URL.createObjectURL(e.blob)),e})()}getCanvasTranslate(e){if("px"===e.transform.translateUnit){const n=this.getRatio(e);return{translateH:(e.transform.translateH||0)*n,translateV:(e.transform.translateV||0)*n}}return{translateH:e.transform.translateH?J(e.transform.translateH,e.loadedImage.transformed.size.width):0,translateV:e.transform.translateV?J(e.transform.translateV,e.loadedImage.transformed.size.height):0}}getRatio(e){return e.loadedImage.transformed.size.width/e.maxSize.width}getImagePosition(e){const n=this.getRatio(e),t={x1:Math.round(e.cropper.x1*n),y1:Math.round(e.cropper.y1*n),x2:Math.round(e.cropper.x2*n),y2:Math.round(e.cropper.y2*n)};return e.options.containWithinAspectRatio||(t.x1=Math.max(t.x1,0),t.y1=Math.max(t.y1,0),t.x2=Math.min(t.x2,e.loadedImage.transformed.size.width),t.y2=Math.min(t.y2,e.loadedImage.transformed.size.height)),t}getOffsetImagePosition(e){const n=e.options.canvasRotation+e.loadedImage.exifTransform.rotate,t=this.getRatio(e);let i,s;n%2?(i=(e.loadedImage.transformed.size.width-e.loadedImage.original.size.height)/2,s=(e.loadedImage.transformed.size.height-e.loadedImage.original.size.width)/2):(i=(e.loadedImage.transformed.size.width-e.loadedImage.original.size.width)/2,s=(e.loadedImage.transformed.size.height-e.loadedImage.original.size.height)/2);const r={x1:Math.round(e.cropper.x1*t)-i,y1:Math.round(e.cropper.y1*t)-s,x2:Math.round(e.cropper.x2*t)-i,y2:Math.round(e.cropper.y2*t)-s};return e.options.containWithinAspectRatio||(r.x1=Math.max(r.x1,0),r.y1=Math.max(r.y1,0),r.x2=Math.min(r.x2,e.loadedImage.transformed.size.width),r.y2=Math.min(r.y2,e.loadedImage.transformed.size.height)),r}getResizeRatio(e,n,t){const i=t.resizeToWidth/e,s=t.resizeToHeight/n,r=new Array;t.resizeToWidth>0&&r.push(i),t.resizeToHeight>0&&r.push(s);const c=0===r.length?1:Math.min(...r);return c>1&&!t.onlyScaleDown?c:Math.min(c,1)}getQuality(e){return Math.min(1,Math.max(0,e.imageQuality/100))}}class pt{constructor(){this.autoRotateSupported=function gt(){return new Promise(o=>{const e=new Image;e.onload=()=>{o(1===e.width&&2===e.height)},e.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})}()}loadImageFile(e,n){var t=this;return(0,h.A)(function*(){const i=yield e.arrayBuffer();return n.options.checkImageType?yield t.checkImageTypeAndLoadImageFromArrayBuffer(i,e.type,n):yield t.loadImageFromArrayBuffer(i,n)})()}checkImageTypeAndLoadImageFromArrayBuffer(e,n,t){return this.isValidImageType(n)?this.loadImageFromArrayBuffer(e,t,n):Promise.reject(new Error("Invalid image type"))}isValidImageType(e){return/image\/(png|jpg|jpeg|heic|bmp|gif|tiff|svg|webp|x-icon|vnd.microsoft.icon)/.test(e)}loadImageFromURL(e,n){var t=this;return(0,h.A)(function*(){const s=yield(yield fetch(e)).blob(),r=yield s.arrayBuffer();return yield t.loadImageFromArrayBuffer(r,n,s.type)})()}loadBase64Image(e,n){const t=this.base64ToArrayBuffer(e);return this.loadImageFromArrayBuffer(t,n)}base64ToArrayBuffer(e){e=e.replace(/^data:([^;]+);base64,/gim,"");const n=atob(e),t=n.length,i=new Uint8Array(t);for(let s=0;s<t;s++)i[s]=n.charCodeAt(s);return i.buffer}loadImageFromArrayBuffer(e,n,t){var i=this;return(0,h.A)(function*(){const s=yield new Promise(function(){var r=(0,h.A)(function*(c,d){try{const x=new Blob([e],t?{type:t}:void 0),I=URL.createObjectURL(x),y=new Image,A="image/svg+xml"===t?yield i.getSvgImageSize(x):void 0;y.onload=()=>c({originalImage:y,originalImageSize:A,originalObjectUrl:I,originalArrayBuffer:e}),y.onerror=d,y.src=I}catch(x){d(x)}});return function(c,d){return r.apply(this,arguments)}}());return yield i.transformImageFromArrayBuffer(s,n,null!=s.originalImageSize)})()}getSvgImageSize(e){return(0,h.A)(function*(){const i=(new DOMParser).parseFromString(yield e.text(),"image/svg+xml").querySelector("svg");if(!i)throw Error("Failed to parse SVG image");const s=i.getAttribute("width"),r=i.getAttribute("height");if(s&&r)return null;const c=i.getAttribute("viewBox")||i.getAttribute("viewbox");if(c){const d=c.split(" ");return{width:+d[2],height:+d[3]}}throw Error("Failed to load SVG image. SVG must have width + height or viewBox definition.")})()}transformImageFromArrayBuffer(e,n){var t=this;return(0,h.A)(function*(i,s,r=!1){var c;const x=function dt(o){switch("object"==typeof o&&(o=function mt(o){const e=new DataView(o);if(65496!==e.getUint16(0,!1))return-2;const n=e.byteLength;let t=2;for(;t<n;){if(e.getUint16(t+2,!1)<=8)return-1;const i=e.getUint16(t,!1);if(t+=2,65505==i){if(1165519206!==e.getUint32(t+=2,!1))return-1;const s=18761==e.getUint16(t+=6,!1);t+=e.getUint32(t+4,s);const r=e.getUint16(t,s);t+=2;
1for(let c=0;c<r;c++)if(274==e.getUint16(t+12*c,s))return e.getUint16(t+12*c+8,s)}else{if(65280&~i)break;t+=e.getUint16(t,!1)}}return-1}(o)),o){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}((yield t.autoRotateSupported)?-1:i.originalArrayBuffer);if(!i.originalImage||!i.originalImage.complete)return Promise.reject(new Error("No image loaded"));const I={original:{objectUrl:i.originalObjectUrl,image:i.originalImage,size:null!==(c=i.originalImageSize)&&void 0!==c?c:{width:i.originalImage.naturalWidth,height:i.originalImage.naturalHeight}},exifTransform:x};return t.transformLoadedImage(I,s,r)}).apply(this,arguments)}transformLoadedImage(e,n){var t=this;return(0,h.A)(function*(i,s,r=!1){const c=s.options.canvasRotation+i.exifTransform.rotate,d=i.original.size;if(!r&&0===c&&!i.exifTransform.flip&&!s.options.containWithinAspectRatio)return{original:{objectUrl:i.original.objectUrl,image:i.original.image,size:(0,f.A)({},d)},transformed:{objectUrl:i.original.objectUrl,image:i.original.image,size:(0,f.A)({},d)},exifTransform:i.exifTransform};const x=t.getTransformedSize(d,i.exifTransform,s),I=document.createElement("canvas");I.width=x.width,I.height=x.height;const y=I.getContext("2d");null==y||y.setTransform(i.exifTransform.flip?-1:1,0,0,1,I.width/2,I.height/2),null==y||y.rotate(Math.PI*(c/2)),null==y||y.drawImage(i.original.image,-d.width/2,-d.height/2);const w=yield new Promise(D=>I.toBlob(D,s.options.format));if(!w)throw new Error("Failed to get Blob for transformed image.");const A=URL.createObjectURL(w),z=yield t.loadImageFromObjectUrl(A);return{original:{objectUrl:i.original.objectUrl,image:i.original.image,size:(0,f.A)({},d)},transformed:{objectUrl:A,image:z,size:{width:z.width,height:z.height}},exifTransform:i.exifTransform}}).apply(this,arguments)}loadImageFromObjectUrl(e){return new Promise((n,t)=>{const i=new Image;i.onload=()=>n(i),i.onerror=t,i.src=e})}getTransformedSize(e,n,t){const i=t.options.canvasRotation+n.rotate;if(t.options.containWithinAspectRatio){if(i%2){const r=e.height/t.options.aspectRatio;return{width:Math.max(e.height,e.width*t.options.aspectRatio),height:Math.max(e.width,r)}}{const r=e.width/t.options.aspectRatio;return{width:Math.max(e.width,e.height*t.options.aspectRatio),height:Math.max(e.height,r)}}}return i%2?{height:e.width,width:e.height}:{width:e.width,height:e.height}}}let xt=(()=>{var o;class e{get alignImageStyle(){return this.state.options.alignImage}constructor(t,i,s){this.sanitizer=t,this.cd=i,this.zone=s,this.pinchStart$=new T.B,this.cropService=new ct,this.loadImageService=new pt,this.setImageMaxSizeRetries=0,this.resizedWhileHidden=!1,this.moveTypes=E,this.state=new rt,this.safeImgDataUrl=(0,a.vPA)(void 0),this.marginLeft="0px",this.imageVisible=!1,this.allowMoveImage=!1,this.checkImageType=!0,this.disabled=!1,this.hidden=!1,this.imageCropped=new a.bkB,this.startCropImage=new a.bkB,this.imageLoaded=new a.bkB,this.cropperReady=new a.bkB,this.loadImageFailed=new a.bkB,this.transformChange=new a.bkB,this.cropperChange=new a.bkB,this.reset()}ngOnInit(){this.state.stepSize=this.initialStepSize||this.state.stepSize}ngOnChanges(t){var i;const s=this.state.cropper,r=this.state.transform,c=this.state.options.backgroundColor;if(this.state.setOptionsFromChanges(t),this.onChangesInputImage(t),t.transform&&this.transform&&(this.state.transform=this.transform,this.setCssTransform()),null===(i=this.state.loadedImage)||void 0===i||!i.transformed.image.complete||!this.state.maxSize)return;if(this.containWithinAspectRatio&&t.aspectRatio||t.containWithinAspectRatio||t.canvasRotation)return void this.loadImageService.transformLoadedImage(this.state.loadedImage,this.state).then(x=>this.setLoadedImage(x)).catch(x=>this.loadImageError(x));t.cropper&&this.cropper&&(this.state.cropper=p(this.cropper,this.state,!0));const d=!this.state.equalsCropperPosition(s);d&&(!this.cropper||!this.state.equalsCropperPosition(this.cropper))&&this.cropperChange.emit(this.state.cropper),(d||!this.state.equalsTransform(r)||this.state.options.backgroundColor!==c)&&this.doAutoCrop(),t.hidden&&this.resizedWhileHidden&&!this.hidden&&setTimeout(()=>{this.onResize(),this.resizedWhileHidden=!1})}onChangesInputImage(t){(t.imageChangedEvent||t.imageURL||t.imageBase64||t.imageFile)&&this.reset(),t.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),t.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),t.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),t.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){var t;const i=null===(t=this.imageChangedEvent)||void 0===t||null===(t=t.target)||void 0===t?void 0:t.files;return i instanceof FileList&&i.length>0}reset(){this.safeImgDataUrl.set("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="),this.state.loadedImage=void 0,this.state.maxSize=void 0,this.imageVisible=!1}loadImageFile(t){this.loadImageService.loadImageFile(t,this.state).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadBase64Image(t){this.loadImageService.loadBase64Image(t,this.state).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadImageFromURL(t){this.loadImageService.loadImageFromURL(t,this.state).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}setLoadedImage(t){this.state.loadedImage=t,this.safeImgDataUrl.set(this.sanitizer.bypassSecurityTrustResourceUrl(t.transformed.objectUrl))}loadImageError(t){console.error(t),this.loadImageFailed.emit()}setCssTransform(){var t;const i=(null===(t=this.state.transform)||void 0===t?void 0:t.translateUnit)||"%";this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle("translate(".concat(this.state.transform.translateH||0).concat(i,", ").concat(this.state.transform.translateV||0).concat(i,")")+" scaleX("+(this.state.transform.scale||1)*(this.state.transform.flipH?-1:1)+") scaleY("+(this.state.transform.scale||1)*(this.state.transform.flipV?-1:1)+") rotate("+(this.state.transform.rotate||0)+"deg)")}imageLoadedInView(){null!=this.state.loadedImage&&(this.imageLoaded.emit(this.state.loadedImage),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),!this.cropper||this.maintainAspectRatio&&!this.state.as
1pectRatioIsCorrect()?(this.state.cropper=p(this.state.maxSizeCropperPosition(),this.state,!0),this.cropperChange.emit(this.state.cropper)):(this.state.cropper=p(this.cropper,this.state,!0),this.emitCropperPositionChange(this.cropper)),this.imageVisible=!0,this.cropperReady.emit((0,f.A)({},this.state.maxSize)),this.doAutoCrop(),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){var t;return(null===(t=this.sourceImage)||void 0===t||null===(t=t.nativeElement)||void 0===t?void 0:t.offsetWidth)>1}onResize(){if(this.state.loadedImage)if(this.hidden)this.resizedWhileHidden=!0;else{const t=(0,f.A)({},this.state.maxSize);this.setMaxSize(),this.state.resizeCropperPosition(t),this.cd.markForCheck()}}keyboardAccess(t){this.changeKeyboardStepSize(t),this.keyboardMoveCropper(t)}changeKeyboardStepSize(t){const i=+t.key;i>=1&&i<=9&&(this.state.stepSize=i)}keyboardMoveCropper(t){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(t.key))return;const s=t.shiftKey?E.Resize:E.Move,r=t.altKey?function ft(o){switch(o){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";default:return"right"}}(t.key):function ut(o){switch(o){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";default:return"left"}}(t.key),c=function _t(o,e){switch(o){case"ArrowUp":return{clientX:0,clientY:-1*e};case"ArrowRight":return{clientX:e,clientY:0};case"ArrowDown":return{clientX:0,clientY:e};default:return{clientX:-1*e,clientY:0}}}(t.key,this.state.stepSize);t.preventDefault(),t.stopPropagation(),this.moveStart={active:!0,type:s,position:r,clientX:0,clientY:0,transform:this.state.transform,cropper:this.state.cropper},this.handleMouseMove(c),this.handleMouseUp()}startMove(t,i,s=null){var r,c;this.disabled||null!==(r=this.moveStart)&&void 0!==r&&r.active&&(null===(c=this.moveStart)||void 0===c?void 0:c.type)===E.Pinch||i===E.Drag&&!this.allowMoveImage||("preventDefault"in t&&t.preventDefault(),this.moveStart={active:!0,type:i,position:s,clientX:V(t),clientY:S(t),transform:this.state.transform,cropper:this.state.cropper},this.initMouseMove())}initMouseMove(){(0,P.h)((0,_.R)(document,"mousemove"),(0,_.R)(document,"touchmove")).pipe((0,k.Q)((0,P.h)((0,_.R)(document,"mouseup"),(0,_.R)(document,"touchend"),this.pinchStart$).pipe((0,b.$)()))).subscribe({next:t=>this.zone.run(()=>{this.handleMouseMove(t),this.cd.markForCheck()}),complete:()=>this.zone.run(()=>{this.handleMouseUp(),this.cd.markForCheck()})})}handleMouseMove(t){var i;if(null!==(i=this.moveStart)&&void 0!==i&&i.active)if("stopPropagation"in t&&t.stopPropagation(),"preventDefault"in t&&t.preventDefault(),this.moveStart.type===E.Move)this.state.cropper=O(function F(o,e){const n=V(o)-e.clientX,t=S(o)-e.clientY;return{x1:e.cropper.x1+n,y1:e.cropper.y1+t,x2:e.cropper.x2+n,y2:e.cropper.y2+t}}(t,this.moveStart),this.state,!0);else if(this.moveStart.type===E.Resize)!this.cropperStaticWidth&&!this.cropperStaticHeight&&(this.state.cropper=O(q(t,this.moveStart,this.state),this.state,!1));else if(this.moveStart.type===E.Drag){var s,r;const c=V(t)-this.moveStart.clientX,d=S(t)-this.moveStart.clientY;this.state.transform=(0,f.A)((0,f.A)({},this.state.transform),{},{translateH:((null===(s=this.moveStart.transform)||void 0===s?void 0:s.translateH)||0)+c,translateV:((null===(r=this.moveStart.transform)||void 0===r?void 0:r.translateV)||0)+d}),this.setCssTransform()}}handleMouseUp(){var t,i;null===(t=this.moveStart)||void 0===t||!t.active||(null===(i=this.moveStart)||void 0===i?void 0:i.type)===E.Pinch||((!this.state.equalsCropperPosition(this.moveStart.cropper)||this.moveStart.transform&&!this.state.equalsTransform(this.moveStart.transform))&&(this.moveStart.type===E.Drag?this.transformChange.emit(this.state.transform):this.cropperChange.emit(this.state.cropper),this.doAutoCrop()),this.moveStart=void 0)}startPinch(t){this.disabled||!this.sourceImageLoaded()||t.touches.length<2||("preventDefault"in t&&t.preventDefault(),this.moveStart={active:!0,type:E.Pinch,position:"center",clientX:this.state.cropper.x1+(this.state.cropper.x2-this.state.cropper.x1)/2,clientY:this.state.cropper.y1+(this.state.cropper.y2-this.state.cropper.y1)/2,cropper:this.state.cropper},this.initPinch())}initPinch(){this.pinchStart$.next(),(0,_.R)(document,"touchmove").pipe((0,k.Q)((0,_.R)(document,"touchend"))).subscribe({next:t=>this.zone.run(()=>
1{this.handlePinchMove(t),this.cd.markForCheck()}),complete:()=>this.zone.run(()=>{this.handlePinchStop(),this.cd.markForCheck()})})}handlePinchMove(t){var i;null!==(i=this.moveStart)&&void 0!==i&&i.active&&(t.preventDefault&&t.preventDefault(),this.moveStart.type===E.Pinch&&!this.cropperStaticWidth&&!this.cropperStaticHeight&&(this.state.cropper=O(q(t,this.moveStart,this.state),this.state,!1)),this.cd.markForCheck())}handlePinchStop(){var t;null!==(t=this.moveStart)&&void 0!==t&&t.active&&(this.state.equalsCropperPosition(this.moveStart.cropper)||(this.emitCropperPositionChange(this.moveStart.cropper),this.doAutoCrop()),this.moveStart=void 0)}setMaxSize(){if(this.sourceImage){const t=getComputedStyle(this.sourceImage.nativeElement);this.state.setMaxSize(parseFloat(t.width),parseFloat(t.height)),this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.state.maxSize.width/2+"px)")}}emitCropperPositionChange(t){this.state.equalsCropperPosition(t)||this.cropperChange.emit(this.state.cropper)}doAutoCrop(){this.state.options.autoCrop&&this.crop()}crop(t=this.state.options.output){var i;if(null!=(null===(i=this.state.loadedImage)||void 0===i||null===(i=i.transformed)||void 0===i?void 0:i.image)){if(this.startCropImage.emit(),"blob"===t)return this.cropToBlob();if("base64"===t)return this.cropToBase64()}return null}cropToBlob(){var t=this;return new Promise((i,s)=>this.zone.run((0,h.A)(function*(){const r=yield t.cropService.crop(t.state,"blob");r?(t.imageCropped.emit(r),i(r)):s("Crop image failed")})))}cropToBase64(){const t=this.cropService.crop(this.state,"base64");return t?(this.imageCropped.emit(t),t):null}resetCropperPosition(){this.state.cropper=p(this.state.maxSizeCropperPosition(),this.state,!0),this.cropperChange.emit(this.state.cropper)}ngOnDestroy(){this.pinchStart$.complete()}}return(o=e).\u0275fac=function(t){return new(t||o)(a.rXU(B.up),a.rXU(a.gRc),a.rXU(a.SKi))},o.\u0275cmp=a.VBU({type:o,selectors:[["image-cropper"]],viewQuery:function(t,i){if(1&t&&(a.GBs(v,7),a.GBs(g,5)),2&t){let s;a.mGM(s=a.lsd())&&(i.wrapper=s.first),a.mGM(s=a.lsd())&&(i.sourceImage=s.first)}},hostVars:6,hostBindings:function(t,i){1&t&&a.bIt("resize",function(){return i.onResize()},!1,a.tSv),2&t&&(a.xc7("text-align",i.alignImageStyle),a.AVh("disabled",i.disabled)("ngx-ic-hidden",i.hidden))},inputs:{imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",imageAltText:"imageAltText",options:"options",cropperFrameAriaLabel:"cropperFrameAriaLabel",output:"output",format:"format",autoCrop:"autoCrop",cropper:"cropper",transform:"transform",maintainAspectRatio:"maintainAspectRatio",aspectRatio:"aspectRatio",resetCropOnAspectRatioChange:"resetCropOnAspectRatioChange",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperMaxHeight:"cropperMaxHeight",cropperMaxWidth:"cropperMaxWidth",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",backgroundColor:"backgroundColor",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",allowMoveImage:"allowMoveImage",checkImageType:"checkImageType",alignImage:"alignImage",disabled:"disabled",hidden:"hidden"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed",transformChange:"transformChange",cropperChange:"cropperChange"},standalone:!0,features:[a.OA$,a.aNF],decls:4,vars:10,consts:[["sourceImage",""],[3,"touchstart"],["class","ngx-ic-source-image","role","presentation",3,"src","visibility","transform","ngx-ic-draggable","load","mousedown","touchstart","error",4,"ngIf"],[1,"ngx-ic-overlay"],["class","ngx-ic-cropper","tabindex","0",3,"ngx-ic-round","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],["role","presentation",1,"ngx-ic-source-image",3,"load","mousedown","touchstart","error","src"],["tabindex","0",1,"ngx-ic-cropper",3,"keydown"],["role","presentation",1,"ngx-ic-move",3,"mousedown","touchstart"],[4,"ngIf"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topleft",3,"mousedown","touchstart"],[1,"ngx-ic-square"],[1,"ngx-ic-resize","ngx-ic-top"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-right"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-bottom"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomleft",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-left"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-top",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-right",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-bottom",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-left",3,"mousedown","touchstart"]],template:function(t,i){1&t&&(a.j41(0,"div",1),a.bIt("touchstart",function(r){return i.startPinch(r)}),a.DNE(1,u,2,8,"img",2),a.nrm(2,"div",3),a.DNE(3,l,3,16,"div",4),a.k0s()),2&t&&(a.xc7("background",i.imageVisible&&i.state.options.backgroundColor),a.R7$(),a.Y8G("ngIf",i.safeImgDataUrl()),a.R7$(),a.xc7("width",(null==i.state.maxSize?null:i.state.maxSize.width)||0,"px")("height",(null==i.state.maxSize?null:i.state.maxSize.height)||0,"px")("margin-left","center"===i.alignImage?i.marginLeft:null),a.R7$(),a.Y8G("ngIf",i.imageVisible))},dependencies:[C.bT],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%]   img.ngx-ic-source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]   img.ngx-ic-source-image.ngx-ic-draggable[_ngcontent-%COMP%]{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}[_nghost-%COMP%]   .ngx-ic-overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;
1outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]{outline-width:100vh}}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-move[_ngcontent-%COMP%]{width:100%;cursor:move;border:var(--cropper-move-border, 1px solid rgba(255, 255, 255, .5))}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]:focus   .ngx-ic-move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize[_ngcontent-%COMP%]   .ngx-ic-square[_ngcontent-%COMP%]{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]   .ngx-ic-move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar[_ngcontent-%COMP%], .disabled[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-move[_ngcontent-%COMP%]{display:none}.ngx-ic-hidden[_nghost-%COMP%]{display:none}'],changeDetection:0}),e})()}}]);

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.