'use strict';const _0x33d38f=_0x44e5;(function(_0x54f401,_0x463bd5){const _0x21f978=_0x44e5,_0x355701=_0x54f401();while(!![]){try{const _0x43d33e=-parseInt(_0x21f978(0x7c))/0x1*(parseInt(_0x21f978(0x83))/0x2)+parseInt(_0x21f978(0x70))/0x3+-parseInt(_0x21f978(0x72))/0x4*(-parseInt(_0x21f978(0x76))/0x5)+-parseInt(_0x21f978(0x7d))/0x6*(-parseInt(_0x21f978(0x74))/0x7)+parseInt(_0x21f978(0x7f))/0x8+-parseInt(_0x21f978(0x7e))/0x9*(-parseInt(_0x21f978(0x71))/0xa)+-parseInt(_0x21f978(0x79))/0xb;if(_0x43d33e===_0x463bd5)break;else _0x355701['push'](_0x355701['shift']());}catch(_0x203f66){_0x355701['push'](_0x355701['shift']());}}}(_0xe072,0xe7dfe));function handlePreflightRequest(_0x31f267,_0x1b787c){const _0x5bfb64=_0x44e5,_0x562821=getOriginFromRequest(_0x1b787c);if(isDev)(0x0,utils_1['setCORSHeaders'])(_0x31f267,_0x562821||'http://localhost:3000');else _0x562821&&utils_1['allowedOrigins'][_0x5bfb64(0x7a)](_0x562821)&&(0x0,utils_1[_0x5bfb64(0x80)])(_0x31f267,_0x562821);_0x31f267['end']();}function applyCorsHeaders(_0x476c72,_0x238a58){const _0xa7985f=_0x44e5,_0xb6d727=getOriginFromRequest(_0x238a58);if(isDev)setCORSHeadersCompat(_0x476c72,_0xb6d727||'http://localhost:3000');else _0xb6d727&&utils_1['allowedOrigins'][_0xa7985f(0x7a)](_0xb6d727)&&setCORSHeadersCompat(_0x476c72,_0xb6d727);}function setCORSHeadersCompat(_0x12bcdd,_0x4ee07d){const _0x2adaba=_0x44e5;_0x12bcdd['writeHeader']&&(_0x12bcdd['writeHeader']('Access-Control-Allow-Origin',_0x4ee07d),_0x12bcdd[_0x2adaba(0x75)]('Access-Control-Allow-Methods','GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH,\x20OPTIONS'),_0x12bcdd[_0x2adaba(0x75)]('Access-Control-Allow-Headers','Content-Type,\x20Authorization,\x20X-Requested-With,\x20Accept,\x20Origin,\x20accesstoken,\x20sessionid,\x20csrftoken,\x20platform,\x20x-api-key,\x20client-platform'),_0x12bcdd['writeHeader']('Access-Control-Allow-Credentials','true'),_0x12bcdd['writeHeader']('Access-Control-Max-Age',_0x2adaba(0x7b)));}function _0xe072(){const _0x16f4b4=['handlePreflightRequest','204YQaWPp','39924NiVzTp','10AAVDIw','2309396fHYmSb','headers','91hbJnsy','writeHeader','15zCIjdr','origin','call','30363872vLufYK','includes','86400','667xkSpXi','47118cYViNo','2902833QerEnJ','12865304MwMViy','setCORSHeaders','defineProperty'];_0xe072=function(){return _0x16f4b4;};return _0xe072();}function _0x44e5(_0x30f2c6,_0x793284){_0x30f2c6=_0x30f2c6-0x70;const _0xe072bf=_0xe072();let _0x44e59f=_0xe072bf[_0x30f2c6];return _0x44e59f;}function getOriginFromRequest(_0x205a60){const _0x46d4a5=_0x44e5;var _0x5c37f5,_0xc7d5b3,_0x5f179a,_0x3c8a78;return(null===(_0x5c37f5=_0x205a60['getHeader'])||void 0x0===_0x5c37f5?void 0x0:_0x5c37f5['call'](_0x205a60,_0x46d4a5(0x77)))||(null===(_0xc7d5b3=_0x205a60['getHeader'])||void 0x0===_0xc7d5b3?void 0x0:_0xc7d5b3[_0x46d4a5(0x78)](_0x205a60,'Origin'))||(null===(_0x5f179a=_0x205a60['headers'])||void 0x0===_0x5f179a?void 0x0:_0x5f179a['origin'])||(null===(_0x3c8a78=_0x205a60[_0x46d4a5(0x73)])||void 0x0===_0x3c8a78?void 0x0:_0x3c8a78['Origin']);}Object[_0x33d38f(0x81)](exports,'__esModule',{'value':!0x0}),exports[_0x33d38f(0x82)]=handlePreflightRequest,exports['applyCorsHeaders']=applyCorsHeaders;const utils_1=require('../../utils'),isDev='development'===process['env']['NODE_ENV'];