1import{e as y}from"./chunk-NAOEBZYB.js";import{a as b}from"./chunk-247YCUVF.js";import"./chunk-K2BAHOWP.js";import{c as _}from"./chunk-4QTHKBSW.js";import{m as h,w as v}from"./chunk-EQ6PZGEX.js";import{Eb as s,Nb as n,Ob as o,Pb as p,Zb as m,bb as g,gb as a,jc as l,kc as x,lb as d,lc as C,sb as u,xb as c}from"./chunk-QZFOZYL5.js";import"./chunk-SZAW6ZBW.js";function E(t,r){t&1&&(n(0,"div",5),p(1,"div",6),n(2,"p",7),l(3,"Loading cargo equipment facilities document..."),o()())}function M(t,r){if(t&1&&(n(0,"div",8),p(1,"i",9),n(2,"p"),l(3),o()()),t&2){let e=m();a(3),x(e.errorMsg)}}function P(t,r){t&1&&(n(0,"div",10),p(1,"i",11),n(2,"p",12),l(3,"Cargo Equipment Facilities document is not available."),o()())}function S(t,r){if(t&1&&p(0,"iframe",19),t&2){let e=m(2);s("src",e.fileUrl,g)}}function U(t,r){t&1&&(n(0,"div",20),p(1,"i",21),n(2,"p",22),l(3,"The document preview could not be loaded securely."),o()())}function q(t,r){if(t&1&&(n(0,"div",13)(1,"div",14)(2,"h2"),l(3,"CARGO EQUIPMENT FACILITIES"),o()(),n(4,"div",15)(5,"p"),l(6),o(),n(7,"div",16),c(8,S,1,1,"iframe",17),o(),c(9,U,4,0,"div",18),o()()),t&2){let e=m();a(6),C("",e.documentTitle||"Below is the detailed cargo equipment facilities document of V.O.Chidambaranar Port Authority:"," "),a(2),s("ngIf",e.fileUrl),a(),s("ngIf",e.iframeError)}}var I=class t{constructor(r,e,i){this.apiService=r;this.sanitizer=e;this.http=i}fileUrl=null;documentTitle=null;isLoading=!1;errorMsg=null;iframeError=!1;data;ngOnInit(){this.getCargoEquipmentFacilities()}getCargoEquipmentFacilities(){this.isLoading=!0,this.errorMsg=null,this.apiService.getAllCargoEquipment().subscribe({next:r=>{let e=r?.data?.data||[];if(e.length>0){let i=e[0].fileViewUrl||e[0].filePath;i?(typeof window<"u"&&window.location.protocol==="https:"&&i.startsWith("http://")&&(i=i.replace("http://","https://")),this.http.get(i,{responseType:"blob"}).subscribe({next:f=>{let w=URL.createObjectURL(f);this.fileUrl=this.sanitizer.bypassSecurityTrustResourceUrl(w)},error:f=>{console.error("Failed to load PDF as blob:",f),this.iframeError=!0}}),this.documentTitle=e[0].title||null):this.fileUrl=null}else this.fileUrl=null;this.isLoading=!1},error:r=>{console.error("Error loading cargo equipment facilities:",r),this.errorMsg="Failed to load cargo equipment facilities document. Please try again later.",this.isLoading=!1,this.fileUrl=null}})}static \u0275fac=function(e){return new(e||t)(d(b),d(y),d(_))};static \u0275cmp=u({type:t,selectors:[["app-cargo-equipment-facilities"]],decls:5,vars:4,consts:[[1,"cargo-equipment-section","text-dark"],["class","text-center py-5 fade-in-up",4,"ngIf"],["class","text-center py-5 text-danger fade-in-up",4,"ngIf"],["class","text-center py-5 text-muted fade-in-up",4,"ngIf"],["class","fade-in-up",4,"ngIf"],[1,"text-center","py-5","fade-in-up"],[1,"spinner-border","text-success"],[1,"mt-3","fw-semibold"],[1,"text-center","py-5","text-danger","fade-in-up"],[1,"ri-error-warning-line","fs-3"],[1,"text-center","py-5","text-muted","fade-in-up"],[1,"ri-information-line","fs-2","text-secondary"],[1,"mt-2","fw-semibold"],[1,"fade-in-up"],[1,"header"],[1,"container"],[1,"pdf-viewer"],["width","100%","height","600px",3,"src",4,"ngIf"],["class","text-center py-4 text-danger fade-in",4,"ngIf"],["width","100%","height","600px",3,"src"],[1,"text-center","py-4","text-danger","fade-in"],[1,"ri-file-pdf-line","fs-1"],[1,"mt-2","text-danger"]],template:function(e,i){e&1&&(n(0,"section",0),c(1,E,4,0,"div",1)(2,M,4,1,"div",2)(3,P,4,0,"div",3)(4,q,10,3,"div",4),o()),e&2&&(a(),s("ngIf",i.isLoading),a(),s("ngIf",!i.isLoading&&i.errorMsg),a(),s("ngIf",!i.isLoading&&!i.errorMsg&&!i.fileUrl),a(),s("ngIf",i.fileUrl))},dependencies:[v,h],styles:['@charset "UTF-8";.cargo-equipment-section[_ngcontent-%COMP%]{margin:0;padding:0;font-family:Poppins,sans-serif}.header[_ngcontent-%COMP%]{background:linear-gradient(135deg,#0b2a55,#124b90);color:#fff;padding:18px 28px;border-radius:10px 10px 0 0;position:relative;overflow:hidden;animation:_ngcontent-%COMP%_slideDown .9s ease forwards}.header[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:0;left:0;height:4px;width:0;background:#00d2ff;animation:_ngcontent-%COMP%_glowLine 1.4s ease-out forwards}h2[_ngcontent-%COMP%]{margin:0;font-size:1.7rem;font-weight:800;letter-spacing:1px;animation:_ngcontent-%COMP%_fadeInUp 1s ease forwards}.container[_ngcontent-%COMP%]{background:#fff;padding:20px 22px;border:1px solid #e2e8f0;border-top:none;border-radius:0 0 10px 10px;animation:_ngcontent-%COMP%_fadeInUp 1s ease .3s forwards;opacity:0}
1p[_ngcontent-%COMP%]{margin-bottom:12px;color:#333;font-size:1rem;line-height:1.6}iframe[_ngcontent-%COMP%]{border:none;border-radius:6px}@keyframes _ngcontent-%COMP%_slideDown{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _ngcontent-%COMP%_glowLine{0%{width:0;opacity:0}to{width:100%;opacity:1}}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(25px)}to{opacity:1;transform:translateY(0)}}.fade-in-up[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeInUp .9s ease forwards}']})};export{I as CargoEquipmentComponent};
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.