PageSourceSearch

https://cdn.centreforaviation.com/client/de13725547a9992b1e1f.js

js centreforaviation.com collected 2026-09-24 17:15:45 UTC 14,443 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcapa_frontend=self.webpackChunkcapa_frontend||[]).push([[4502],{2256:function(t,e,r){r.d(e,{A:function(){return G}});var n,i,a,o,s,c,u,p,l,d,f=r(5743),y=r(25602),h=r(92517),v=r(41003),m=r(26045),b=r.n(m),g=r(7391),k=r(27192),T=r(95300),C=r(112),A=r(85284),w=r(69614),M=r(88310),q=r(36826),S=r(44058),D=r(80159),F=r(83237),P=r(10626),E=r(4728),O=r(98308),x=r(29995);function N(t,e,r,n){d||(d="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=t&&t.defaultProps,a=arguments.length-3;if(e||0===a||(e={children:void 0}),1===a)e.children=n;else if(a>1){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+3];e.children=o}if(e&&i)for(var c in i)void 0===e[c]&&(e[c]=i[c]);else e||(e=i||{});return{$$typeof:d,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function j(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function K(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class I extends y.Component{constructor(t){var e,r={},n={},i={};super(t),e=this,K(this,"buildGraphData",function(){j(this,r);const{capacity:t,dataType:n,bizModel:i,fType:a,direction:o,type:s,id:c}=e.props,u={};t.forEach(function(t){switch(a){case"international":if(t.dep.country.id==t.arr.country.id)return;break;case"domestic":if(t.dep.country.id!=t.arr.country.id)return}if(parseInt(i)&&t.airline.bizmodel.id!=i)return;let e=t.dep.id,r=t.arr.id;4==s&&(e=t.dep.country.id,r=t.arr.country.id),5==s&&(e=t.dep.country.region.id,r=t.arr.country.region.id),6==s&&(e=t.dep.country.region.metaregion.id,r=t.arr.country.region.metaregion.id),"departing"==o&&e!=c||"arrival"==o&&r!=c||e!=c&&r!=c||(u[t.airline.id]||(u[t.airline.id]={name:t.airline.name,total:0}),u[t.airline.id].total+=(0,S.A)({field:n,route:t,id:this.props.id,type:this.props.type}))},e);let p=[];for(const t in u)p.push(u[t]);return p=p.sort(e.totalSort),p}.bind(r)),K(this,"setDisplayOptions",function(){j(this,n);let t,r=e.buildGraphData();switch(e.props.chartType){case"bar":{if(r.length>10){const t=r.slice(0,10),e=r.slice(10);let n=0;e.forEach(function(t){n+=t.total}),r=t.concat([{name:"Others",total:n}])}const n=[],i=[];r.forEach(function(t){n.push(t.name),i.push(t.total)});const a=(0,D.A)(e.props.dataType,e.props.fType);t={chart:{type:"bar"},xAxis:{categories:n,title:{text:"Airline"}},yAxis:{title:{text:a}},series:[{data:i}]};break}case"pie":{if(r.length>6){const t=r.slice(0,6),e=r.slice(6);let n=0;e.forEach(function(t){n+=t.total}),r=t.concat([{name:"Others",total:n}])}const e=[];r.forEach(function(t){e.push([t.name,t.total])}),t=b()(A.he),t.series=[{data:e}];break}}t.tooltip={formatter:(0,F.A)(e.props.dataType,e.props.chartType)};return{graph:t,csv:e.buildCSVData(r)}}.bind(n)),K(this,"buildCSVData",function(t){j(this,i);const{dataType:r,fType:n}=e.props,a=[["Airline",(0,D.A)(r,n)]];return t.forEach(function(t){a.push([t.name,t.total])}),a}.bind(i));const{dispatch:a,settingKey:o,persist:s,cargo:c,chartType:u}=t;(0,q.A)({setField:w.x,makeChartTypesMenu:M.B4,makeFTypesMenu:M.Zt,makeTypesMenu:M.$U},this),a({type:x.C1,persist:s,settingKey:o,data:{dataType:c?"payload":"seats",chartType:u||"bar"}})}totalSort(t,e){return t.total<e.total?1:t.total>e.total?-1:0}render(){const{capacity:t,name:e,date:r,bare:d,cargo:f,id:y,type:m,dataType:b,fType:A,bizModel:w,chartType:M,direction:q,myCAPA:S}=this.props;if(t&&b){const t=this.setDisplayOptions(),l=this.makeTypesMenu(f,!1,!1,!0),C=this.makeFTypesMenu(!0),D=N("div",{},void 0,this.makeChartTypesMenu(["bar","pie"],!0),N("div",{},void 0,!S&&!d&&N(O.A,{id:"profile-capacity-airline",name:e+" capacity by airline",settings:{id:y,type:m,fType:A,direction:q,dataType:b,bizModel:w,chartType:M,cargo:f}}),!S&&e," ",C," ",N("select",{value:q,onChange:this.setField("direction")},void 0,n||(n=N("option",{value:"departing"},void 0,"departing")),i||(i=N("option",{value:"arrival"},void 0,"arriving")),a||(a=N("option",{value:"both"},void 0,"two-way")))," ",l," for"," ",N("select",{value:w,onChange:this.setField("bizModel")},void 0,o||(o=N("option",{value:"0"},void 0,"all business models")),s||(s=N("option",{value:"3"},void 0,"full service carriers")),c||(c=N("option",{value:"5"},void 0,"low cost carriers")))),N("div",{className:"week"},void 0,"Week commencing ",(0,h.GP)((0,v.D5)(r),"dd-MMM-yyyy"))),F=u||(u=N(g.Md,{})),E=["capa","oag"];let x;return!d&&f&&(x=p||(p=N(P.CW,{}))),N(T.A,{filename:e+" capacity by airline",data:t.csv},void 0,N(k.A,{chartType:M,config:t.graph,watermark:E,className:"graph",header:D,footer:F,note:x,noExport:d,isTrial:this.props.isTrial}))}
1return l||(l=N(C.A,{text:"Loading capacity by airline"}))}}var z=(0,E.A)(I,{bizModel:0,direction:"departing",fType:"system"},!0),G=(0,f.A)(z)},5743:function(t,e,r){var n=r(25602),i=r(92517),a=r(41003),o=r(92369),s=r(28802),c=r(65290),u=r(18911),p=r(97094),l=r.n(p);function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},d.apply(null,arguments)}function f(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.A=function(t){class e extends n.Component{constructor(...e){var r,n={},o={};super(...e),r=this,y(this,"getCapacity",function(t){f(this,n);const{date:e,id:o,type:u,capacity:p,marketCapacity:l,dispatch:d}=r.props,y="marketing"===t?l:p,h=(0,i.GP)((0,a.D5)(e),"dd-MMM-yyyy");let v="capacity-"+u+"-"+o+"-"+h+"-"+t;y||(0,c.VP)(v)||d((0,s.lD)({loadID:v,id:o,type:u,date:h,attribution:t}))}.bind(n)),y(this,"getCapacities",function(){f(this,o),Object.prototype.hasOwnProperty.call(r.props,"marketCapacity")?(r.getCapacity("marketing"),l()(r.props.type,t.carrierGrouping)&&r.getCapacity("operating")):r.getCapacity("operating")}.bind(o))}componentDidMount(){this.getCapacities()}componentDidUpdate(t){const{capacity:e,marketCapacity:r}=this.props;(!e&&t.capacity||!r&&t.marketCapacity)&&this.getCapacities()}render(){const e=Object.prototype.hasOwnProperty.call(this.props,"marketCapacity")&&!l()(this.props.type,t.carrierGrouping)?this.props.marketCapacity:this.props.capacity;return n.createElement(t,d({},this.props,{capacity:e}))}}const r=(0,u.y)("capacity");return(0,o.Ng)(r)(e)}},84502:function(t,e,r){r.r(e);var n=r(25602),i=r(2256),a=r(38415);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(null,arguments)}const s=function(t){!function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(this,void 0);const{settingKey:e}=t,r=(0,a.dU)(e);return r?n.createElement(i.A,o({},t,r)):null}.bind(void 0);e.default=s},38415:function(t,e,r){r.d(e,{M3:function(){return y},Mr:function(){return k},OX:function(){return b},Q3:function(){return T},SM:function(){return v},TE:function(){return m},dS:function(){return f},dU:function(){return g},t0:function(){return l},vA:function(){return C},xc:function(){return d}});var n=r(25602),i=r(92369),a=r(50919),o=r(56243),s=r(89754),c=r(44711),u=r(28802);function p(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function l(t){var e=this;return(0,i.d4)(function(r){return p(this,e),r.toolSettings[t]}.bind(this),{equalityFn:i.bN})}function d(t){var e=this;return(0,i.d4)(function(r){p(this,e);const n=r.data.profiles,{type:i,id:a}=r.toolSettings[t];return n[i]&&n[i][a]?n[i][a]:{}}.bind(this),{equalityFn:i.bN})}function f(t){var e=this;const r=(0,i.wA)(),a=l(t),o=d(t),{id:s,type:c}=a,f="mycapa-profile-"+c+"-"+s,y=(0,i.d4)(function(t){return p(this,e),t.loading[f]}.bind(this),{equalityFn:i.bN}),{info:h}=o;return(0,n.useEffect)(function(){p(this,e),h||y||r((0,u.qk)({id:s,type:c,loadID:f}))}.bind(this),[]),h}function y(){var t=this;return(0,i.d4)(function(e){return p(this,t),e.loading}.bind(this),{equalityFn:i.bN})}function h(t,{profileKey:e,actionCreator:r,loadIDPrefix:a,mapResult:o}){var s=this;const c=(0,i.wA)(),u=l(t),f=d(t),{id:y,type:h}=u,v=f[e];return(0,n.useEffect)(function(){p(this,s),v||c(r({id:y,loadID:a+"-"+h+"-"+y,type:h}))}.bind(this),[c,r,y,a,v,h]),v?o(v):null}function v(t){var e=this;return h(t,{profileKey:"codeshares",actionCreator:u.qT,loadIDPrefix:"codeshares-data",mapResult:function(t){return p(this,e),{codeshares:t}}.bind(this)})}function m(t,e=!1){const r=l(t),n=d(t),i=f(t);if(!i)return null;return{...r,date:i.eto?(0,o.W)((0,a.S)(i.eto)):(0,o.W)((0,s.b)(new Date)),fleet:n[e?"currentFleet":"fleet"]}}function b(t){return m(t,!0)}function g(t){const e=l(t),r=d(t),n=f(t);if(!n)return null;const i=(0,o.W)((0,s.b)(new Date)),a=e.country||(n.country&&n.country.id?n.country.id:4==e.type?e.id:0);return{...e,date:i,country:a,capacity:r.capacity,marketCapacity:r.marketCapacity}}function k(t){var e=this;return h(t,{profileKey:"sustainability",actionCreator:u.sg,loadIDPrefix:"sustainability-data",mapResult:function(t){return p(this,e),{sustainability:t.data,source:t.meta.source,fNotes:t.meta.note}}.bind(this)})}function T(t){var e=this;return h(t,{profileKey:"safContracts",actionCreator:u.ib,loadIDPrefix:"saf-contracts-data",mapResult:function(t){return p(this,e),{safContracts:t.data}}.bind(this)})}function C(t,e){var r=this;const n=(0,i.d4)(function(t){return p(this,r),t.user.activesubs}.bind(this),{equalityFn:i.bN});return"boolean"==typeof e?e:(0,c.mv)(n,t)}},35009:function(t,e){e.A=.621371192},44058:function(t,e,r){r.d(e,{A:function(){return a}}),r.dn(a);var n=r(35009);const i=function({route:t,depArr:e,id:r,type:n}){switch(n){case 2:return t[e].id==r?t.freq[e]:0;case 4:return t[e].country.id==r?t.freq[e]:0;case 5:return t[e].country.region.id==r?t.freq[e]:0;case 6:return t[e].country.region.metaregion.id==r?t.freq[e]:0;default:return t.freq[e]}};function a({field:t,route:e,id:r,type:a=1}){switch(t){case"seats":return e.seats.total;case"asks":return e.seats.asks;case"asms":return Math.round(e.seats.asks*n.A);case"aftks":return e.freight.aftks;case"aftms":return Math.round(e.freight.aftks*n.A);case"freight":case"payload":return e.freight.total;case"depfreq":case"freq":return i({route:e,depArr:"dep",id:r,type:a});case"arrfreq":return i({route:e,depArr:"arr",id:r,type:a});case"movements":return i({route:e,depArr:"dep",id:r,type:a})+i({route:e,depArr:"arr",id:r,type:a})}}},88310:function(t,e,r){var n,i,a,o,s,c,u,p,l,d,f,y,h,v,m,b,g,k,T,C,A;r(25602);function w(t,e,r,n){A||(A="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=t&&t.defaultProps,a=arguments.length-3;if(e||0===a||(e={children:void 0}),1===a)e.children=n;else if(a>1){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+3];e.children=o}if(e&&i)for(var c in i)void 0===e[c]&&(e[c]=i[c]);else e||(e=i||{});return{$$typeof:A,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}r.d(e,["$U",0,function(t,e,r,d){const f=d?this.props:this.state;let y;return t?y=[n||(n=w("option",{value:"payload"},"payload","cargo payload (kg)")),i||(i=w("option",{value:"aftks"},"aftks","AFTKs")),a||(a=w("option",{value:"aftms"},"aftms","AFTMs"))]:(y=[o||(o=w("option",{value:"seats"},"seats","seats")),s||(s=w("option",{value:"asks"},"asks","ASKs")),c||(c=w("option",{value:"asms"},"asms","ASMs"))],r||y.push(u||(u=w("option",{value:"depfreq"},"depfreq","departing frequency"))),e||(r||y.push(p||(p=w("option",{value:"arrfreq"},"arrfreq","arriving frequency"))),y.push(l||(l=w("option",{value:"movements"}
1,"movements","movements"))))),w("select",{value:f.dataType,onChange:this.setField("dataType")},void 0,y)},"B4",0,function(t,e){const r=e?this.props:this.state,n={line:b||(b=w("option",{value:"line"},"line","line chart")),column:g||(g=w("option",{value:"column"},"column","column chart")),bar:k||(k=w("option",{value:"bar"},"bar","bar chart")),pie:T||(T=w("option",{value:"pie"},"pie","pie chart")),map:C||(C=w("option",{value:"map"},"map","map"))},i=t.map(function(t){return n[t]});return w("div",{className:"chartType"},void 0,w("label",{},void 0,"Show as"," ",w("select",{value:r.chartType,onChange:this.setField("chartType")},void 0,i)))},"Y1",0,function(t){return w("div",{className:"subheading"},void 0,w("label",{},void 0,w("input",{type:"checkbox",checked:(t?this.props:this.state).home,onChange:this.toggleField("home")})," ","Include home country/territory departures"))},"Zt",0,function(t){return w("select",{value:(t?this.props:this.state).fType,onChange:this.setField("fType")},void 0,d||(d=w("option",{value:"system"},void 0,"system")),f||(f=w("option",{value:"international"},void 0,"international")),y||(y=w("option",{value:"domestic"},void 0,"domestic")))},"rn",0,function(t){return w("select",{value:(t?this.props:this.state).bellyType,onChange:this.setField("bellyType")},void 0,h||(h=w("option",{value:"total"},void 0,"total")),v||(v=w("option",{value:"belly"},void 0,"passenger")),m||(m=w("option",{value:"freighter"},void 0,"freighter")))}])},80159:function(t,e){e.A=function(t,e){let r="Number of ";switch(e&&(r+=" "+e),t){case"seats":r+=" seats";break;case"aftks":r+=" AFTKs";break;case"aftms":r+=" AFTMs";break;case"freight":case"cargo":case"payload":r="Cargo payload (kg)";break;case"asks":r+=" ASKs";break;case"asms":r+=" ASMs";break;case"depfreq":case"freq":r+=" departing frequencies";break;case"arrfreq":r+=" arriving frequencies";break;case"destinations":r+=" destinations";break;case"movements":r+=" movements";break;case"routes":r+=" routes"}return r}},50919:function(t,e,r){r.d(e,{S:function(){return i}});var n=r(97245);function i(t,e){return(0,n.a)(1e3*t,e?.in)}},56243:function(t,e,r){r.d(e,{W:function(){return i}});var n=r(97245);function i(t){return+(0,n.a)(t)}}}]);

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.