PageSourceSearch

https://www.albyphoto.it/664.1755fa93f5440642.js

js albyphoto.it collected 2026-10-02 13:27:45 UTC 8,215 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkswite_frontend_ng=self.webpackChunkswite_frontend_ng||[]).push([[664],{5664:(H,$,l)=>{l.d($,{P:()=>T});var F=l(4004),d=l(2340),g=l(4650),y=l(529),O=l(6906),z=l(5861),D=l(7579),v=l(9646),N=l(9770),I=l(457),_=l(8312),U=l(590);let C=(()=>{class o{constructor(t){this.$http=t,this.editorSettings={},this.notificationState=!1,this.notify=new D.x,this.notify$=this.notify.asObservable(),this.imageProcessed=new D.x,this.imageProcessed$=this.imageProcessed.asObservable(),this._setNormalSize=(e,i)=>{e.width=i.width||i.original.size.width,e.height=i.height||i.original.size.height},this._setSwitchedSize=(e,i)=>{e.width=i.height,e.height=i.width,e.canvasSwitched=!0},this._getProxyUrl=e=>e?-1!==e.indexOf(this.fileFormats.cu)?(0,v.of)(e):(0,N.P)(()=>(0,I.D)(this.api.getProxyImageUrl(e))):(0,v.of)(null),this._scaleDimension=(e,i,s)=>e*(i/s),this._warningOnWindth=(e,i)=>this.__warningOnDim(e,i,"width"),this._warningOnHeight=(e,i)=>this.__warningOnDim(e,i,"height"),this.__isDimValid=(e,i,s)=>i.minSizes?e[s]>=i.minSizes[s]:e[s]>=(i.deviation||this.editorSettings.deviation)*(i[s]||this.editorSettings[s]),this.__warningOnDim=(e,i,s)=>this.__isDimValid(e,i,s)&&e[s]<i[s],this.imageProcessingConfig=L,this.imageProperties=new x}pushImageProcessed(t){this.imageProcessed.next(t)}setEditorSettings(t){this.editorSettings=t}getEditorSettings(){return this.editorSettings}normalize(t,e,i){var s=this;return new Promise((h,n)=>{t||(console.error("Error while loading image"),n()),this.getNewImageObject(t).then(function(){var a=(0,z.Z)(function*(r){return yield s.normalizeImageOnLoad(r,e,i)});return function(r){return a.apply(this,arguments)}}()).then(h).catch(a=>{console.error("Error while loading image",a),n()}),this.notificationState=!1})}getNewImageObject(t){return new Promise((e,i)=>{let s=new Image;s.onload=()=>{e(s)},s.onerror=h=>{i(h)},s.src=t})}downloadImage(t,e){return this._getProxyUrl(t).pipe((0,_.V)(h=>(0,I.D)(this._getImage(h,e)))).pipe((0,U.P)())}base64ToBlob(t,e){let i={type:e||""};const s=atob(t.split(",")[1]),h=s.length,n=Math.ceil(h/this.imageProcessingConfig.sliceSize);let a=new Array(n);for(let r=0;r<n;++r){const c=r*this.imageProcessingConfig.sliceSize,f=Math.min(c+this.imageProcessingConfig.sliceSize,h);let S=new Array;for(let w=c;w<f;++w)S.push(s[w].charCodeAt(0));a[r]=new Uint8Array(S)}return new Blob(a,i)}recognizeFormatFromArrayBuffer(t,e){return e?this.fileFormats[e]:this.fileFormats.png}getBase64ImageFormat(t){return t?this.fileFormats[t]:this.fileFormats.png}isBase64(t){return!!t&&t.indexOf(";base64")>=0}getNotificationState(){return this.notificationState}resetNotificationState(){this.notificationState=!1}setImageProperties(t){let e=new x;this._setSizeFromOrientation(e,t),this._scaleToMax(e),this.imageProperties=e}_getImage(t,e){return new Promise((i,s)=>{this.$http.get(t).subscribe(h=>{const n=this.recognizeFormatFromArrayBuffer(h.data,e);let a=new Blob([h.data],{type:n}),r=new FileReader;r.onload=()=>{this.getNewImageObject(r.result).then(c=>{let f=this.imageProperties.newInstance();this._setSizeFromOrientation(f,c),this._scaleToMax(f)}).catch(()=>{console.log("CATCH")}).then(()=>{i({src:r.result,format:n})})},r.readAsDataURL(a)},h=>s(h))})}normalizeImageOnLoad(t,e,i){var s=this;return(0,z.Z)(function*(){let a,r,h=document.createElement("canvas"),n=s.imageProperties;s._setSizeFromOrientation(n,t),s._scaleToMax(n);let{width:c,height:f}=s.setImageDimension(n,i);h.width=c,h.height=f,a=h.getContext("2d");let S=0,w=0,m=h.width,p=h.height;return i&&i.backgroundColor&&(a.fillStyle="#ffffff",a.fillRect(0,0,m,p)),0!==n.degree&&(a.clearRect(0,0,h.width,h.height),a.translate(h.width/2,h.height/2),a.rotate(n.degree*(Math.PI/180)),p=n.canvasSwitched?h.width:h.height,m=n.canvasSwitched?h.height:h.width,S=-m/2,w=-p/2),a.drawImage(t,S,w,m,p),r=h.toDataURL(e),new Promise((A,B)=>{s.getNewImageObject(r).then(b=>{A(r),s.notify.next({message:"normalizedImage",data:s.notificationState})}).catch(b=>{console.error(b),B(b)})})})()}_setSizeFromOrientation(t,e){switch(t.orientation){case 8:t.degree=-90,this._setSwitchedSize(t,e);break;case 6:t.degree=90,this._setSwitchedSize(t,e);break;case 3:t.degree=180,this._setNormalSize(t,e);break;default:t.degree=0,this._setNormalSize(t,e)}}_scaleToMax(t){return t.width>t.height?t.width>=this.imageProcessingConfig.maxSize?(t.setDimension(this.imageProcessingConfig.maxSize,this._scaleDimension(t.height,this.imageProcessingConfig.maxSize,t.width)),t.height<this.editorSettings.height&&t.setDimension(this._scaleDimension(t.width,this.editorSettings.height,t.height),this.editorSettings.height)):this._warningOnWindth(t,this.editorSettings)?(this.notificationState=!0,t.width/t.height>this.editorSettings.width/this.editorSettings.height?t.setDimension(this._scaleDimension(t.width,this.editorSettings.height,t.height),this.editorSettings.height):t.setDimension(this.editorSettings.width,this._scaleDimension(t.height,this.editorSettings.width,t.width))):this._warningOnHeight(t,this.editorSettings)&&(this.notificationState=!0,t.setDimension(this._scaleDimension(t.width,this.editorSettings.height,t.height),this.editorSettings.height)):t.height>=this.imageProcessingConfig.maxSize?(t.setDimension(this._scaleDimension(t.width,this.imageProcessingConfig.maxSize,t.height),this.imageProcessingConfig.maxSize),t.width<this.editorSettings.width&&t.setDimension(this.editorSettings.width,this._scaleDimension(t.height,this.editorSettings.width,t.width))):(this._warningOnHeight(t,this.editorSettings)||this._warningOnWindth(t,this.editorSettings))&&(this.notificationState=!0,t.setDimension(this.editorSettings.width,this._scaleDimension(t.height,this.editorSettings.width,t.width))),t}isHeightValid(t,e){return this.__isDimValid(t,e,"height")}isWidthValid(t,e){return this.__isDimValid(t,e,"width")}setImageDimension(t,e){if(e&&e.width){if(e.height)return{width:e.width,height:e.height};let i=e.width;return{width:i,height:i/t.width*t.height}}
1if(e&&e.height){let i=e.height;return{width:i/t.height*t.width,height:i}}return{width:t.width,height:t.height}}}return o.\u0275fac=function(t){return new(t||o)(g.LFG(y.eN))},o.\u0275prov=g.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();class x{constructor(){this.width=0,this.height=0,this.orientation=0,this.degree=0,this.canvasSwitched=!1,this.width=0,this.height=0,this.orientation=1,this.degree=0,this.canvasSwitched=!1}setDimension(u,t){this.width=u,this.height=t}}const L={maxSize:2560,fileHeader:{png:["89504e47"],jpeg:["ffd8ffe0","ffd8ffe1","ffd8ffe2","ffd8ffe3","ffd8ffe8"]},sliceSize:1024};let T=(()=>{class o{constructor(t,e,i){this.http=t,this.api=e,this.imageProcessing=i}getPageSettings(t){return this.http.get(`${d.N.api_base_path}api/page/${t}/settings`)}updatePageSettings(t,e){return this.http.patch(`${d.N.api_base_path}api/page/${t}`,e)}getFaviconUrl(t,e){const i=new FormData,s=this.dataURItoBlob(e);return i.append("file",s),this.http.post(`${d.N.api_base_path}api/page/${t}/file/favicon`,i)}updateFavicon(t,e){return this.http.patch(`${d.N.api_base_path}api/page/${t}`,e)}deletePolicyPdf(t,e){let s=`${d.N.api_base_path}api/page/${t}/policy/${e}`;return this.http.delete(`${d.N.api_base_path}api/page/${t}/file/${e}`).pipe((0,F.U)(()=>this.http.patch(s,{url:null,is_file:!1,title:""}).subscribe()))}insertPolicy(t,e){return this.http.put(`${d.N.api_base_path}api/page/${t}/policy`,e)}getPolicyPdfUrl(t,e,i){const s=new FormData,h=this.dataURItoBlob(e);return s.append("file",h),this.http.post(`${d.N.api_base_path}api/page/${t}/file/${i}`,s)}updateCookieInfo(t,e){return this.http.put(`${d.N.api_base_path}api/page/${t}/cookieInfo`,e)}fileToEvent(t){return new Promise((e,i)=>{let s=new FileReader;s.onload=h=>{e(h)},s.onerror=h=>{console.log(h),i(h)},s.readAsDataURL(t)})}convertEventToImage(t,e,i){return this.imageProcessing.normalize(e.target.result,t.format,i)}dataURItoBlob(t){let e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],s=[];for(let h=0;h<e.length;h++)s.push(e.charCodeAt(h));return new Blob([new Uint8Array(s)],{type:i})}}return o.\u0275fac=function(t){return new(t||o)(g.LFG(y.eN),g.LFG(O.sM),g.LFG(C))},o.\u0275prov=g.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()}}]);

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.