/*!CK:3803314707!*//*1459137600,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["8WvPX"]); }

/*
 * @preserve-header
 *
 * Javascript EXIF Reader 0.1.6
 * Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
 * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
 */__d("exif/exif",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();var h=(function(){var i={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},j={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},k={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},l={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function m(y,event,z){if(y.addEventListener){y.addEventListener(event,z,false);}else if(y.attachEvent)y.attachEvent("on"+event,z);}function n(y){return !!(y.exifdata);}function o(y,z){BinaryAjax(y.src,function(aa){var ba=p(aa.binaryResponse);y.exifdata=ba||{};if(z)z.call(y);});}function p(y){if(y.getByteAt(0)!=255||y.getByteAt(1)!=216)return false;var z=2,aa=y.getLength(),ba;while(z<aa){if(y.getByteAt(z)!=255)return false;ba=y.getByteAt(z+1);if(ba==22400){return s(y,z+4,y.getShortAt(z+2,true)-2);}else if(ba==225){return s(y,z+4,y.getShortAt(z+2,true)-2);}else z+=2+y.getShortAt(z+2,true);}}function q(y,z,aa,ba,ca){var da=y.getShortAt(aa,ca),ea={},fa,ga,ha;for(ha=0;ha<da;ha++){fa=aa+ha*12+2;ga=ba[y.getShortAt(fa,ca)];ea[ga]=r(y,fa,z,aa,ca);}return ea;}function r(y,z,aa,ba,ca){var da=y.getShortAt(z+2,ca),ea=y.getLongAt(z+4,ca),fa=y.getLongAt(z+8,ca)+aa,ga,ha,ia,ja,ka,la;switch(da){case 1:case 7:if(ea==1){return y.getByteAt(z+8,ca);}else{ga=ea>4?fa:(z+8);ha=[];for(ja=0;ja<ea;ja++)ha[ja]=y.getByteAt(ga+ja);return ha;}case 2:ga=ea>4?fa:(z+8);return y.getStringAt(ga,ea-1);case 3:if(ea==1){return y.getShortAt(z+8,ca);}else{ga=ea>2?fa:(z+8);ha=[];for(ja=0;ja<ea;ja++)ha[ja]=y.getShortAt(ga+2*ja,ca);return ha;}case 4:if(ea==1){return y.getLongAt(z+8,ca);}else{ha=[];for(var ja=0;ja<ea;ja++)ha[ja]=y.getLongAt(fa+4*ja,ca);return ha;}case 5:if(ea==1){ka=y.getLongAt(fa,ca);la=y.getLongAt(fa+4,ca);ia=new Number(ka/la);ia.numerator=ka;ia.denominator=la;return ia;}else{ha=[];for(ja=0;ja<ea;ja++){ka=y.getLongAt(fa+8*ja,ca);la=y.getLongAt(fa+4+8*ja,ca);ha[ja]=new Number(ka/la);ha[ja].numerator=ka;ha[ja].denominator=la;}return ha;}case 9:if(ea==1){return y.getSLongAt(z+8,ca);}else{ha=[];for(ja=0;ja<ea;ja++)ha[ja]=y.getSLongAt(fa+4*ja,ca);return ha;}case 10:if(ea==1){return y.getSLongAt(fa,ca)/y.getSLongAt(fa+4,ca);}else{ha=[];for(ja=0;ja<ea;ja++)ha[ja]=y.getSLongAt(fa+8*ja,ca)/y.getSLongAt(fa+4+8*ja,ca);return ha;}}}function s(y,z){if(y.getStringAt(z,4)!="Exif")return false;var aa,ba,ca,da,ea,fa=z+6;if(y.getShortAt(fa)==18761){aa=false;}else if(y.getShortAt(fa)==19789){aa=true;}else return false;if(y.getShortAt(fa+2,aa)!=42)return false;if(y.getLongAt(fa+4,aa)!=8)return false;ba=q(y,fa,fa+8,j,aa);if(ba.ExifIFDPointer){da=q(y,fa,fa+ba.ExifIFDPointer,i,aa);for(ca in da){switch(ca){case "LightSource":case "Flash":case "MeteringMode":case "ExposureProgram":case "SensingMethod":case "SceneCaptureType":case "SceneType":case "CustomRendered":case "WhiteBalance":case "GainControl":case "Contrast":case "Saturation":case "Sharpness":case "SubjectDistanceRange":case "FileSource":da[ca]=l[ca][da[ca]];break;case "ExifVersion":case "FlashpixVersion":da[ca]=String.fromCharCode(da[ca][0],da[ca][1],da[ca][2],da[ca][3]);break;case "ComponentsConfiguration":da[ca]=l.Components[da[ca][0]]+l.Components[da[ca][1]]+l.Components[da[ca][2]]+l.Components[da[ca][3]];break;}ba[ca]=da[ca];}}if(ba.GPSInfoIFDPointer){ea=q(y,fa,fa+ba.GPSInfoIFDPointer,k,aa);for(ca in ea){switch(ca){case "GPSVersionID":ea[ca]=ea[ca][0]+"."+ea[ca][1]+"."+ea[ca][2]+"."+ea[ca][3];break;}ba[ca]=ea[ca];}}return ba;}function t(y,z){if(!y.complete)return false;if(!n(y)){o(y,z);}else if(z)z.call(y);return true;}function u(y,z){if(!n(y))return;return y.exifdata[z];}function v(y){if(!n(y))return {};var z,aa=y.exifdata,ba={};for(z in aa)if(aa.hasOwnProperty(z))ba[z]=aa[z];return ba;}function w(y){if(!n(y))return "";var z,aa=y.exifdata,ba="";for(z in aa)if(aa.hasOwnProperty(z))if(typeof aa[z]=="object"){if(aa[z] instanceof Number){ba+=z+" : "+aa[z]+" ["+aa[z].numerator+"/"+aa[z].denominator+"]\r\n";}else ba+=z+" : ["+aa[z].length+" values]\r\n";}else ba+=z+" : "+aa[z]+"\r\n";return ba;}function x(y){return p(y);}return {readFromBinaryFile:x,pretty:w,getTag:u,getAllTags:v,getData:t,Tags:i,TiffTags:j,GPSTags:k,StringValues:l};})();f.exports=h;},null);
__d('ImageExif',['exif/exif'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(k){this.getByteAt=function(l){return k.getUint8(l);};this.getShortAt=function(l,m){return k.getUint16(l,!m);};this.getSShortAt=function(l,m){return k.getInt16(l,!m);};this.getLongAt=function(l,m){return k.getUint32(l,!m);};this.getSLongAt=function(l,m){return k.getInt32(l,!m);};this.getStringAt=function(l,m){var n=Array(m);for(var o=0;o<m;o++)n.push(String.fromCharCode(this.getByteAt(l+o)));return n.join('');};this.getLength=function(){return k.byteLength;};}function i(k){var l=function(m){return k.charCodeAt(m)&255;};this.getByteAt=l;this.getShortAt=function(m,n){var o=this.getSShortAt(m,n);return o>0?o:o+65536;};this.getSShortAt=function(m,n){var o=l(m),p=l(m+1);return n?(o<<8)+p:(p<<8)+o;};this.getLongAt=function(m,n){var o=this.getSLongAt(m,n);return o>0?o:o+4294967296;};this.getSLongAt=function(m,n){var o=l(m),p=l(m+1),q=l(m+2),r=l(m+3);return n?(((o<<8)+p<<8)+q<<8)+r:(((r<<8)+q<<8)+p<<8)+o;};this.getStringAt=function(m,n){return k.substr(m,n);};this.getLength=function(){return k.length;};}var j={readFromFile:function(k,l){var m=new FileReader();m.addEventListener('load',function(event){var n=event.target.result,o=n instanceof ArrayBuffer?this.readFromArrayBuffer(n):this.readFromBinaryString(n);l(o);}.bind(this),false);if(window.DataView){m.readAsArrayBuffer(k);}else m.readAsBinaryString(k);},readFromBinaryString:function(k){return c('exif/exif').readFromBinaryFile(new i(k));},readFromArrayBuffer:function(k){return c('exif/exif').readFromBinaryFile(new h(new DataView(k)));}};f.exports=j;},null);
__d("Collection",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){if(!i.__collection__){var k=new Function();for(var l in i.prototype)k.prototype[l]=h._call.bind(null,l);i.__collection__=k;}var m=new i.__collection__();m._elements=j;return m;}h._call=function(i){var j=Array.prototype.slice.call(arguments,1);this._elements.forEach(function(k){k[i].apply(k,j);});return this;};f.exports=h;},null);
__d('Drag',['Event','Arbiter','DOM','Style','Vector'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={};h.currentDraggable=null;h.grab=function(i){if(h.currentDraggable)h._onmouseup();i.lastDragOver=null;h.attachDragEvents();h.currentDraggable=i;};h.attachDragEvents=function(){document.onselectstart=function(){document.onselectstart=null;return false;};if(h.dragEventsAttached)return;h.dragEventsAttached=true;c('Arbiter').subscribe('scroller/scroll',h._onmousemove);c('Event').listen(document,{mousemove:h._onmousemove,mouseup:h._onmouseup});};h.droppables={};h.addDroppable=function(i,j){(h.droppables[i]=h.droppables[i]||[]).push(j);};h.removeDroppable=function(i,j){h.droppables[i]=h.droppables[i].filter(function(k){return k!=j;});};h.getOffsetParent=function(i){if(c('DOM').isNodeOfType(i,['body','html']))return document.body;while((i=i.parentNode)&&i!==document.body)if(c('Style').get(i,'position')!=='static')return i;return document.body;};h._onmousemove=function(event,i){if(!h.currentDraggable)return;var j=i||c('Vector').getEventPosition(event),k=h.currentDraggable,l=h.droppables[k.namespace];if(k.namespace&&k.active&&l){var m={};l.forEach(function(s){m[s.zIndex]=s.zIndex;});var n=[];for(var o in m)n.push(m[o]);n.sort();var p=k.lastDragOver,q=null;for(var r=n.length-1;r>=0;r--)if(p&&p.dom!=null&&p.zIndex==n[r]&&p.isDraggedOver(j)){q=p;break;}else for(o=0;o<l.length;o++){if(n[r]!=l[o].zIndex)continue;if(p!=l[o]&&k.dom!=l[o].dom&&l[o].isDraggedOver(j)){q=l[o];r=-1;break;}}if(q&&q!=p){q.ondragover(k);h.currentDraggable.adjustCursorPosition();}if(q)q.ondragmove(k,j.sub(c('Vector').getElementPosition(q.dom)));k.lastDragOver=q;}h.currentDraggable._onmousemove(j);};h._onmouseup=function(i){document.onselectstart=null;if(h.currentDraggable){h.currentDraggable._ondrop();h.currentDraggable=null;}};f.exports=h;},null);
__d('Draggable',['Event','Arbiter','Collection','DOM','Drag','Rect','Style','Vector','emptyFunction'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(j){'use strict';this.canvas=j;this.scrollZone=50;this.velocity=100;this.coefficient=1;}h.prototype.activate=function(){'use strict';this.activate=c('emptyFunction');this.event=c('Event').listen(document,'mousemove',this._onmousemove.bind(this));this.interval=setInterval(this._intervalHandler.bind(this),50);this.cursor=null;};h.prototype.deactivate=function(){'use strict';delete this.activate;this.event&&this.event.remove();this.event=null;clearInterval(this.interval);};h.prototype._onmousemove=function(event){'use strict';this.cursor=c('Vector').getEventPosition(event);};h.prototype._intervalHandler=function(){'use strict';if(!this.cursor)return;var j=this.canvas==document.body?c('Rect').getViewportBounds():new (c('Rect'))(this.canvas),k=new (c('Rect'))(this.cursor.y-j.t,j.r-this.cursor.x,j.b-this.cursor.y,this.cursor.x-j.l),l=new (c('Vector'))(0,0);if(k.t<k.b&&k.t<this.scrollZone){l.y=-this.scrollZone+k.t;}else if(k.b<this.scrollZone)l.y=this.scrollZone-k.b;l.y=this._doMath(l.y);if(k.l<k.r&&k.l<this.scrollZone){l.x=-this.scrollZone+k.l;}else if(k.r<this.scrollZone)l.x=this.scrollZone-k.r;l.x=this._doMath(l.x);if(l.x||l.y){l.scrollElementBy(this.canvas);if(document.body==this.canvas){var m=c('Vector').getScrollPosition();l.scrollElementBy(this.canvas);var n=c('Vector').getScrollPosition();this.cursor=this.cursor.add(n.sub(m));}else l.scrollElementBy(this.canvas);c('Arbiter').inform('scroller/scroll',this.cursor);}};h.prototype._doMath=function(j){'use strict';j=j>=0?Math.min(j,this.scrollZone):Math.max(j,-this.scrollZone);return Math.floor(Math.pow(j/this.scrollZone*this.velocity,this.coefficient));};h.findScrollParent=function(j){'use strict';var k;j=j.parentNode;while(j){if(j.scrollHeight!=j.offsetTop){k=c('Style').get(j,'overflowY');if(k=='scroll'||k=='auto')return j;}j=j.parentNode;}return document.body;};function i(j){'use strict';if(!j)throw new Error('Element should be a DOM node');if(!(this instanceof i)){if(j instanceof Array){var k=[];j.forEach(function(l){k.push(new i(l));});return new (c('Collection'))(i,k);}else return new i(j);}else{this.data={};this.handles=[];this.dom=j;this.boundingBox=null;this.useScroller=true;this.grabPctX=this.grabPctY=0;this._shouldKillEvents=true;this.addHandle(this.dom);}}i.prototype.destroy=function(){'use strict';this.handles.forEach(function(j){this.removeHandle(j.obj);}.bind(this));this.data=this.dom=null;};i.prototype.adjustCursorPosition=function(){'use strict';var j=c('Vector').getElementDimensions(this.dom);this.cursorPositionVector=new (c('Vector'))(parseInt(this.grabPctX*j.x,10),parseInt(this.grabPctY*j.y,10));};i.prototype._onclick=function(event){'use strict';if(!this._shouldKillEvents)return true;if(this.active)return c('Event').kill(event);};i.prototype._ongrab=function(j){'use strict';this.ongrab();if(this.useScroller){if(!this.scroller)this.scroller=new h(h.findScrollParent(this.dom));this.scroller.activate();}if(this.active){if(!this.oldPosition)this.oldPosition=this.dom.style.position;var k=c('Drag').getOffsetParent(this.dom);if(k!==document.body)j=j.sub(c('Vector').getElementPosition(k));this.dom.style.position=this.absolute?'absolute':'relative';j.sub(this.cursorPositionVector).setElementPosition(this.dom);}};i.prototype._onmousedown=function(event){'use strict';if(!(event.which&&event.which===1||event.button&&event.button===1))return;var j=event.getTarget();if(c('DOM').isNodeOfType(j,['input','select','textarea','object','embed']))return true;var k=c('Vector').getEventPosition(event),l=c('Vector').getElementDimensions(this.dom);this.draggableInitialVector=c('Vector').getElementPosition(this.dom);this.cursorPositionVector=k.sub(this.draggableInitialVector);this.grabPctX=l.x===0?0:this.cursorPositionVector.x/l.x;this.grabPctY=l.y===0?0:this.cursorPositionVector.y/l.y;c('Drag').grab(this,event);if(this.gutter){this.cursorInitialVector=k;}else{this._setActive(true);this._ongrab(k);}if(!this._shouldKillEvents)return true;return c('Event').kill(event);};i.prototype._onmousemove=function(j){'use strict';if(!this.active)if(j.distanceTo(this.cursorInitialVector)>=this.gutter){this._setActive(true);this._ongrab(j);}if(this.active){var k=j.sub(this.cursorPositionVector),l;if(this.boundingBox){var m=c('Rect').newFromVectors(k,c('Vector').getElementDimensions(this.dom));m=m.boundWithin(this.boundingBox);k=m.getPositionVector();if(this.boundingBox.w()===0){l=new (c('Vector'))(this.draggableInitialVector.x,k.y,'document');}else if(this.boundingBox.h()===0){l=new (c('Vector'))(k.x,this.draggableInitialVector.y,'document');}else l=k;}else l=k;var n=c('Drag').getOffsetParent(this.dom);if(n!==document.body)l=l.sub(c('Vector').getElementPosition(n));l.setElementPosition(this.dom);this.ondrag(j);}};i.prototype._ondrop=function(){'use strict';this.scroller&&this.scroller.deactivate();if(this.active){setTimeout(function(){this._setActive(false);}.bind(this),0);this.ondrop(this.scroller&&this.scroller.cursor);if(this.lastDragOver)this.lastDragOver.ondrop(this);}};i.prototype.killDrag=function(){'use strict';this._setActive(false);c('Drag')._onmouseup();};i.prototype.forceDrop=function(){'use strict';c('Drag')._onmouseup();};i.prototype.setBoundingBox=function(j){'use strict';this.boundingBox=j;return this;};i.prototype.resetPosition=function(){'use strict';this.dom.style.position=this.oldPosition;this.oldPosition=null;this.dom.style.left='';this.dom.style.top='';return this;};i.prototype.setUseAbsolute=function(j){'use strict';this.absolute=j;return this;};i.prototype.setDragHandler=function(j){'use strict';this.ondrag=j;return this;};i.prototype.setGrabHandler=function(j){'use strict';this.ongrab=j;return this;};i.prototype.setDropHandler=function(j){'use strict';this.ondrop=j;return this;};i.prototype.setGutter=function(j){'use strict';this.gutter=j;return this;};i.prototype.setNamespace=function(j){'use strict';this.namespace=j;return this;};i.prototype.setUseScroller=function(j){'use strict';this.useScroller=j;return this;};i.prototype.setAvoidKillingEvents=function(j){'use strict';this._shouldKillEvents=!j;return this;};i.prototype.addHandle=function(j){'use strict';if(this.handles.length==1&&this.handles[0].obj==this.dom)this.removeHandle(this.dom);this.handles.push({obj:j,evt:[c('Event').listen(j,'mousedown',this._onmousedown.bind(this)),c('Event').listen(j,'click',this._onclick.bind(this)),c('Event').listen(j,'drag',this._killUnlessActive.bind(this)),c('Event').listen(j,'selectstart',this._killUnlessActive.bind(this))]});return this;};i.prototype.removeHandle=function(j){'use strict';this.handles=this.handles.filter(function(k){if(k.obj!=j){return true;}else{k.evt.forEach(function(l){l.remove();});return false;}});};i.prototype.getDOM=function(){'use strict';return this.dom;};i.prototype.setKey=function(j,k){'use strict';this.data[j]=k;return this;};i.prototype.getKey=function(j){'use strict';return this.data[j];};i.prototype._setActive=function(j){'use strict';if(!this.dom)return;this.dom.activeDrag=this.active=j;for(var k=0;k<this.handles.length;k++)this.handles[k].obj.activeDrag=j;};i.prototype._killUnlessActive=function(j){'use strict';if(!this._shouldKillEvents)return;if(j.getTarget()!==document.activeElement)return j.kill();};i.prototype.ondrag=c('emptyFunction');i.prototype.ongrab=c('emptyFunction');i.prototype.ondrop=c('emptyFunction');i.prototype.gutter=0;i.prototype.handles=null;f.exports=i;},null);
__d('TimelineMapScrollableArea',['Animation','ArbiterMixin','CSS','DOM','Event','Run','Scroll','SimpleDrag','Style','Vector','$','shield'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){i&&this.init(c('$')(i),j);}Object.assign(h.prototype,c('ArbiterMixin'),{init:function(i,j){j=j||{};this._elem=i;this._wrap=c('DOM').find(i,'div.fbScrollableAreaWrap');this._body=c('DOM').find(this._wrap,'div.fbScrollableAreaBody');this._track=c('DOM').find(i,'div.fbScrollableAreaTrack');this._gripper=c('DOM').find(this._track,'div.fbScrollableAreaGripper');this._options=j;this.adjustGripper();this._listeners=[c('Event').listen(this._wrap,'scroll',this._handleScroll.bind(this))];if(j.fade!==false)this._listeners.push(c('Event').listen(i,'mouseenter',c('shield')(this.adjustGripper,this)),c('Event').listen(i,'mouseenter',c('shield')(this.showScrollbar,this)),c('Event').listen(i,'mousemove',this._handleMousemove.bind(this)),c('Event').listen(i,'mouseout',c('shield')(this.hideScrollbar,this)));if(j.fade!==undefined)this._listeners.push(c('Event').listen(this._track,'click',this.clickToScroll.bind(this)));if(j.verticalscroll)this._listeners.push(c('Event').listen(this._wrap,'mousewheel',this.mouseWheel.bind(this)),c('Event').listen(this._wrap,'DOMMouseScroll',this.mouseWheel.bind(this)));this.initDrag();if(!j.persistent)c('Run').onLeave(this.destroy.bind(this));},getRoot:function(){return this._elem;},initDrag:function(){var i=new (c('SimpleDrag'))(this._gripper);i.subscribe('start',function(j,event){if(!(event.which&&event.which===1||event.button&&event.button===1))return;this.inform('dragstart');var k=c('Vector').getEventPosition(event).x,l=this._gripper.offsetLeft,m=i.subscribe('update',function(o,p){var q=c('Vector').getEventPosition(p).x-k,r=this._elem.clientWidth,s=this._body.offsetWidth,t=this._track.offsetWidth,u=r/s*t,v=s-this._wrap.offsetWidth,w=l+q,x=t-u;w=Math.max(Math.min(w,x),0);var y=w/x*v;c('Scroll').setLeft(this._wrap,y);}.bind(this)),n=i.subscribe('end',function(){i.unsubscribe(m);i.unsubscribe(n);this.inform('dragend');}.bind(this));}.bind(this));},adjustGripper:function(){var i=this._elem.clientWidth,j=this._body.offsetWidth,k=this._track.offsetWidth,l=i/j*k;if(l<k){c('Style').set(this._gripper,'width',l+'px');var m=c('Scroll').getLeft(this._wrap)/j*k;c('Style').set(this._gripper,'left',m+'px');c('CSS').show(this._gripper);}else c('CSS').hide(this._gripper);this._checkContentBoundaries();return this;},_checkContentBoundaries:function(){var i=c('Scroll').getLeft(this._wrap),j=this._wrap.scrollWidth-this._wrap.clientWidth;c('CSS').conditionClass(this._elem,'contentBefore',i>0);c('CSS').conditionClass(this._elem,'contentAfter',i<j);},destroy:function(){this._listeners.forEach(function(i){i.remove();});this._listeners.length=0;},_handleMousemove:function(event){var i=c('Vector').getElementPosition(this._track).y,j=c('Vector').getElementDimensions(this._track).y;if(Math.abs(i+j/2-c('Vector').getEventPosition(event).y)<25){this.showScrollbar(false);}else this.hideScrollbar();},_handleScroll:function(event){this.adjustGripper();if(this._options.fade!==false)this.showScrollbar();},hideScrollbar:function(){if(!this._scrollbarVisible)return this;this._scrollbarVisible=false;if(this._hideTimeout){clearTimeout(this._hideTimeout);this._hideTimeout=null;}this._hideTimeout=setTimeout(function(){if(this._scrollbarAnimation){this._scrollbarAnimation.stop();this._scrollbarAnimation=null;}this._scrollbarAnimation=new (c('Animation'))(this._track).from('opacity',1).to('opacity',0).duration(250).ondone(c('CSS').addClass.bind(null,this._track,'invisible_elem')).go();}.bind(this),750);return this;},showScrollbar:function(i){if(this._scrollbarVisible)return this;this._scrollbarVisible=true;if(this._hideTimeout){clearTimeout(this._hideTimeout);this._hideTimeout=null;}if(this._scrollbarAnimation){this._scrollbarAnimation.stop();this._scrollbarAnimation=null;}this.adjustGripper();c('Style').set(this._track,'opacity',1);c('CSS').removeClass(this._track,'invisible_elem');if(i!==false)this.hideScrollbar();return this;},clickToScroll:function(event){var i=c('Vector').getEventPosition(event).x,j=this._elem.clientWidth,k=this._body.offsetWidth,l=this._track.offsetWidth,m=j/k*l,n=c('Vector').getElementPosition(this._gripper);if(i>=n.x&&i<=n.x+m)return;var o=i<n.x?-1:1,p=this._wrap.offsetWidth*.8*o;this.scrollBy(p);},scrollBy:function(i){this.setScroll(c('Scroll').getLeft(this._wrap)+i);},getMaxBodyOffset:function(){return this._body.offsetWidth-this._wrap.offsetWidth;},setScroll:function(i){var j=i;j=Math.max(Math.min(j,this.getMaxBodyOffset()),0);c('Scroll').setLeft(this._wrap,j);},scrollIntoView:function(i){var j=this._wrap.clientWidth,k=i.offsetWidth,l=c('Scroll').getLeft(this._wrap),m=l+j,n=i.offsetLeft,o=n+k;if(n<l||j<k){this.setScroll(n);}else if(o>m)this.setScroll(l+(o-m));},mouseWheel:function(event){if(this.getMaxBodyOffset()<=0)return;var i=0;if(event.wheelDelta){var j=event.wheelDelta;if(event.wheelDeltaX&&event.wheelDeltaY)j=Math.abs(event.wheelDeltaX)>Math.abs(event.wheelDeltaY)?event.wheelDeltaX:event.wheelDeltaY;i=-j*10/40;}else if(event.detail)i=event.detail*10;this.scrollBy(i);event.prevent();}});f.exports=b.TimelineMapScrollableArea||h;},null);
__d('PhotoEditorSaveStates',['requireWeak','Map'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h;c('requireWeak')('PhotoEditorGraphic',function(l){h=l.Sticker;});var i=new (c('Map'))(),j=new (c('Map'))(),k={setState:function(l,m){i.set(l,m);},getState:function(l){return i.get(l);},setLoggingData:function(l,m){j.set(l,m);},getLoggingData:function(l){return j.get(l);},getTotalNumOfStickersOnPhoto:function(l){if(i.get(l))return i.get(l).graphics.filter(function(m){return h&&m.type===h;}).length;return 0;}};f.exports=k;},null);
__d('StringEncoding',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(o,p){var q=new Uint8Array(o),r=0,s=[];while(r<q.length){var t=q[r],u=void 0;if(t>>7===0){u=1;}else if(t>>5===6){t&=31;u=2;}else if(t>>4===14){t&=15;u=3;}else if(t>>3===30){t&=7;u=4;}else if(t>>2===62){t&=3;u=5;}else if(t>>1===126){t&=1;u=6;}else throw new Error('Cannot decode as UTF-8 - '+'unrecognised codepoint header');if(r+u>q.length)throw new Error('Cannot decode as UTF-8 - '+'incomplete codepoint');for(var v=1;v<u;v++){var w=q[r+v];if(w>>6!==2)throw new Error('Cannot decode as UTF-8 - '+'unrecognised codepoint subsequent byte');w&=63;t<<=6;t|=w;}if(t>1114111)throw new Error('Cannot decode as UTF-8 - '+"JavaScript doesn't support codepoints over 0x10FFFF");if(!t)switch(p){case 'error':throw new Error('Cannot decode as UTF-8 - '+"contains a null and we're not allowing them");case 'ignore':continue;case 'truncate':return String.fromCodePoint.apply(String,s);case 'include':break;}s.push(t);r+=u;}return String.fromCodePoint.apply(String,s);}function i(o){return (o&255)<<8|o>>8;}function j(o,p){if(o.byteLength%2!==0)throw new Error('Cannot decode as UTF-16 - '+'data length mod 2 != 0');var q=new Uint16Array(o),r=0,s=[],t=false;if(q[0]===65279){++r;}else if(q[0]==65534){++r;t=true;}while(r<q.length){var u=q[r];if(t)u=i(u);var v=u;if(u>55295&&u<57344){if((u&64512)!==55296)throw new Error('Cannot decode as UTF-16 - '+'incorrect signature for high surrogate');if(r+1>=q.length)throw new Error('Cannot decode as UTF-16 - '+'incomplete codepoint');++r;var w=q[r];if(t)w=i(w);if((w&64512)!==56320)throw new Error('Cannot decode as UTF-16 - '+'incorrect signature for low surrogate');v=((u&1023)<<10|w&1023)+65536;}if(!v)switch(p){case 'error':throw new Error('Cannot decode as UTF-16 - '+"contains a null and we're not allowing them");case 'ignore':continue;case 'truncate':return String.fromCodePoint.apply(String,s);case 'include':break;}s.push(v);++r;}return String.fromCodePoint.apply(String,s);}function k(o){return ((o&255)<<24|(o&255<<8)<<8|(o&255<<16)>>8|o>>>24);}function l(o,p){if(o.byteLength%4!==0)throw new Error('Cannot decode as UTF-32 - '+'data length mod 4 != 0');var q=new Uint32Array(o),r=0,s=[],t=false;if(q[0]===65279){++r;}else if(q[0]==4294836224){++r;t=true;}while(r<q.length){var u=q[r];if(t)u=k(u);if(u&2147483648)throw new Error('Cannot decode as UTF-32 - '+'invalid codepoint');if(u>1114111)throw new Error('Cannot decode as UTF-32 - '+"JavaScript doesn't support codepoints over 0x10FFFF");if(!u)switch(p){case 'error':throw new Error('Cannot decode as UTF-32 - '+"contains a null and we're not allowing them");case 'ignore':continue;case 'truncate':return String.fromCodePoint.apply(String,s);case 'include':break;}s.push(u);++r;}return String.fromCodePoint.apply(String,s);}var m={'utf-8':h,'utf-16':j,'utf-32':l};function n(o,p){if(o){this.$Decoder1=o;}else this.$Decoder1=['utf-8','utf-16','utf-32'];if(!p)p='error';this.$Decoder2=p;for(var q=this.$Decoder1,r=Array.isArray(q),s=0,q=r?q:q[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var t;if(r){if(s>=q.length)break;t=q[s++];}else{s=q.next();if(s.done)break;t=s.value;}var u=t;this.$Decoder3(u);}}n.prototype.getPrecedence=function(){return this.$Decoder1;};n.prototype.decode=function(o){var p=[];for(var q=this.$Decoder1,r=Array.isArray(q),s=0,q=r?q:q[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var t;if(r){if(s>=q.length)break;t=q[s++];}else{s=q.next();if(s.done)break;t=s.value;}var u=t,v=this.$Decoder3(u);try{return v(o,this.$Decoder2);}catch(w){p.push(w);}}throw new Error(p.join(', '));};n.prototype.$Decoder3=function(o){var p=m[o];if(!p)throw new Error('Unknown encoding '+o);return p;};f.exports.Decoder=n;},null);
__d('ImageMetadata',['regeneratorRuntime','Promise','StringEncoding','ImageExif'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(m){this.$ImageMetadata4=m;this.$ImageMetadata5=new Uint8Array(m);this.$ImageMetadata6();}h.prototype.$ImageMetadata6=function(){var m=0;while(m<this.$ImageMetadata5.length){m=this.$ImageMetadata7(m);if(m===-1)return;var n=this.$ImageMetadata5[m+1],o=i[n];if(!o)return;var p=o.length;if(p===undefined)p=this.$ImageMetadata5[m+2]*256+this.$ImageMetadata5[m+3];this.$ImageMetadata8(m,p,o);if(o.name==='SOS')return;m+=2+p;}};h.prototype.$ImageMetadata8=function(m,n,o){switch(o.name){case 'APP1':if(this.$ImageMetadata9(m+4,j)){this.$ImageMetadata10(m+4+j.length,n-2-j.length);}else if(this.$ImageMetadata9(m+4,k)){this.$ImageMetadata11(m+4+k.length,n-2-k.length);}else if(this.$ImageMetadata9(m+4,l))this.$ImageMetadata12(m+4+l.length,n-2-l.length);break;case 'SOF0':case 'SOF1':case 'SOF2':case 'SOF3':case 'SOF5':case 'SOF6':case 'SOF7':case 'JPG':case 'SOF9':case 'SOF10':case 'SOF11':case 'SOF13':case 'SOF14':case 'SOF15':this.$ImageMetadata13(m+4,n-2);break;}};h.prototype.$ImageMetadata13=function(m,n){var o=this.$ImageMetadata5[m+3]*256+this.$ImageMetadata5[m+4],p=this.$ImageMetadata5[m+1]*256+this.$ImageMetadata5[m+2];if(o>0&&p>0)this.$ImageMetadata3={x:o,y:p};};h.prototype.$ImageMetadata10=function(m,n){var o=c('ImageExif').readFromArrayBuffer(this.$ImageMetadata4)||{},p={};for(var q in o){var r=o[q];if(typeof r==='string')r=r.trim();p[q.trim()]=r;}this.$ImageMetadata1=p;};h.prototype.$ImageMetadata11=function(m,n){this.$ImageMetadata2={};var o=this.$ImageMetadata2,p=new (c('StringEncoding').Decoder)(null,'truncate');try{var r=p.decode(this.$ImageMetadata4.slice(m,m+n));}catch(q){return;}for(var s=0;s<r.length;++s){var t=r.indexOf('<GPano:',s);if(t==-1)break;var u=r.indexOf('>',t),v=r.substring(t+1,u).trim(),w=r.indexOf('<',u),x=r.substring(u+1,w).trim();o[v]=x;s=w;}for(var y=0;y<r.length;++y){var z=r.indexOf('GPano:',y);if(z==-1)break;var aa=r.indexOf('=',z),ba=r.substring(z,aa).trim(),ca=r.indexOf('"',z);if(ba.indexOf('>')==-1&&ba.indexOf('<')==-1){var da=r.indexOf('"',ca+1),ea=r.substring(ca+1,da).trim();o[ba]=ea;y=da;}}};h.prototype.$ImageMetadata12=function(m){};h.prototype.$ImageMetadata9=function(m,n){for(var o=n,p=Array.isArray(o),q=0,o=p?o:o[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var r;if(p){if(q>=o.length)break;r=o[q++];}else{q=o.next();if(q.done)break;r=q.value;}var s=r;if(this.$ImageMetadata5[m]!==s.charCodeAt(0))return false;++m;}return true;};h.prototype.$ImageMetadata7=function(m){for(var n=m;n+1<this.$ImageMetadata5.length;++n)if(this.$ImageMetadata5[n]===255&&this.$ImageMetadata5[n+1]!==0&&this.$ImageMetadata5[n+1]!==255)return n;return -1;};h.prototype.hasExif=function(){return Boolean(this.$ImageMetadata1);};h.prototype.hasXMP=function(){return Boolean(this.$ImageMetadata2);};h.prototype.hasSize=function(){return Boolean(this.$ImageMetadata3);};h.prototype.getExif=function(){if(!this.$ImageMetadata1)throw new Error('Image has no Exif data');return this.$ImageMetadata1;};h.prototype.getXMP=function(){if(!this.$ImageMetadata2)throw new Error('Image has no XMP data');return this.$ImageMetadata2;};h.prototype.getSize=function(){if(!this.$ImageMetadata3)throw new Error('Could not find size data?!');return this.$ImageMetadata3;};h.genMetadataFromBlob=function m(n){return c('regeneratorRuntime').async(function o(p){while(1)switch(p.prev=p.next){case 0:p.t0=h;p.next=3;return c('regeneratorRuntime').awrap(h.$ImageMetadata14(n));case 3:p.t1=p.sent;return p.abrupt('return',new p.t0(p.t1));case 5:case 'end':return p.stop();}},null,this);};h.$ImageMetadata14=function(m){return new (c('Promise'))(function(n,o){var p=new b.FileReader();p.onabort=o;p.onerror=o;p.onload=n;p.readAsArrayBuffer(m);});};var i=[];i[216]={name:'SOI',length:0};i[192]={name:'SOF0'};i[193]={name:'SOF1'};i[194]={name:'SOF2'};i[195]={name:'SOF3'};i[197]={name:'SOF5'};i[198]={name:'SOF6'};i[199]={name:'SOF7'};i[200]={name:'JPG'};i[201]={name:'SOF9'};i[202]={name:'SOF10'};i[203]={name:'SOF11'};i[205]={name:'SOF13'};i[206]={name:'SOF14'};i[207]={name:'SOF15'};i[196]={name:'DHT'};i[219]={name:'DQT'};i[221]={name:'DRI',length:2};i[218]={name:'SOS'};i[208]={name:'RST0',length:0};i[209]={name:'RST1',length:0};i[210]={name:'RST2',length:0};i[211]={name:'RST3',length:0};i[212]={name:'RST4',length:0};i[213]={name:'RST5',length:0};i[214]={name:'RST6',length:0};i[215]={name:'RST7',length:0};i[224]={name:'APP0'};i[225]={name:'APP1'};i[226]={name:'APP2'};i[227]={name:'APP3'};i[228]={name:'APP4'};i[229]={name:'APP5'};i[230]={name:'APP6'};i[231]={name:'APP7'};i[232]={name:'APP8'};i[233]={name:'APP9'};i[234]={name:'APP10'};i[235]={name:'APP11'};i[236]={name:'APP12'};i[237]={name:'APP13'};i[238]={name:'APP14'};i[239]={name:'APP15'};i[254]={name:'COM'};i[217]={name:'EOI',length:0};var j='Exif\0\0',k='http://ns.adobe.com/xap/1.0/\0',l='http://ns.adobe.com/xmp/extension/\0';f.exports=h;},null);
__d('SphericalImage',['Promise','regeneratorRuntime','ImageMetadata'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(p){return new (c('Promise'))(function(q,r){var s=new b.FileReader();s.onabort=r;s.onerror=r;s.onload=function(event){return q(event.target.result);};s.readAsArrayBuffer(p);});}function i(p){if(!p.hasXMP())return false;var q=p.getXMP();return Boolean(q['GPano:ProjectionType']&&q['GPano:CroppedAreaImageWidthPixels']&&q['GPano:CroppedAreaImageHeightPixels']&&q['GPano:FullPanoWidthPixels']&&q['GPano:FullPanoHeightPixels']);}var j={'iPhone 4s':{x:19334,y:3264},'iPhone 5':{x:18521,y:3264},'iPhone 5s':{x:17279,y:3264},'iPhone 6':{x:17731,y:3264},'iPhone 6s':{x:21729,y:4000}};function k(p){if(!p.hasExif())return false;var q=p.getExif();if(q.Make!='Apple')return false;var r=j[q.Model];if(!r)return false;var s=void 0,t=void 0;if(q.ExifImageWidth&&q.ExifImageLength)if(!t||q.ExifImageWidth>t.x)t={x:q.ExifImageWidth,y:q.ExifImageLength};if(q.ImageWidth&&q.ImageLength)if(!t||q.ImageWidth>t.x)t={x:q.ImageWidth,y:q.ImageLength};if(q.OriginalImageWidth&&q.OriginalImageHeight)if(!t||q.OriginalImageWidth>t.x)t={x:q.OriginalImageWidth,y:q.OriginalImageHeight};if(q.PixelXDimension&&q.PixelYDimension)if(!t||q.PixelXDimension>t.x)t={x:q.PixelXDimension,y:q.PixelYDimension};if(p.hasSize()){s=p.getSize();var u=l(s);if(t){var v=l(t);if(!m(u,v))return false;}if(u<1)return false;}var w=t||s;if(!w)return false;if(!m(w.y,r.y))return false;return true;}function l(p){return p.x/p.y;}function m(p,q){return p>.9*q&&p<1.1*q;}function n(p){return (i(p)||k(p));}function o(p){var q,r;return c('regeneratorRuntime').async(function s(t){while(1)switch(t.prev=t.next){case 0:t.next=2;return c('regeneratorRuntime').awrap(h(p));case 2:q=t.sent;r=new (c('ImageMetadata'))(q);return t.abrupt('return',n(r));case 5:case 'end':return t.stop();}},null,this);}f.exports={isSphericalBlob:o,isSphericalMetadata:n};},null);
__d('ReactComposerMediaActionType',['keyMirror'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('keyMirror')({SET_MEDIA_CONFIG:null});},null);
__d('ReactComposerMediaStore',['ReactComposerMediaActionType','ReactComposerStoreBase'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ReactComposerStoreBase'));i=h&&h.prototype;function j(){'use strict';var k;i.constructor.call(this,function(){return {createAlbumLink:null,taggingDataSource:null,videoUploader:null,videoProgressBar:null,videoProgressBarInstance:null};},function(l){switch(l.type){case c('ReactComposerMediaActionType').SET_MEDIA_CONFIG:k&&k.$ReactComposerMediaStore1(l);break;}});k=this;}j.prototype.getCreateAlbumLink=function(k){'use strict';return this.getComposerData(k).createAlbumLink;};j.prototype.getTaggingDataSource=function(k){'use strict';return this.getComposerData(k).taggingDataSource;};j.prototype.getVideoUploader=function(k){'use strict';return this.getComposerData(k).videoUploader;};j.prototype.getVideoProgressBarInstance=function(k){'use strict';return this.getComposerData(k).videoProgressBarInstance;};j.prototype.getVideoProgressBar=function(k){'use strict';return this.getComposerData(k).videoProgressBar;};j.prototype.$ReactComposerMediaStore1=function(k){'use strict';var l=this.getComposerData(k.composerID);l.createAlbumLink=k.config.createAlbumLink;l.taggingDataSource=k.config.taggingDataSource;l.videoUploader=k.config.videoUploader;l.videoProgressBar=k.config.videoProgressBar;l.videoProgressBarInstance=k.config.videoProgressBarInstance;this.emitChange(k.composerID);};f.exports=new j();},null);
__d('ReactComposerMediaFilterUtils',['ComposerXNativeAudioUploadsConfig','VideoUploadConfig'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={hasVideos:function(i){return this.filterVideos(i).length>0;},hasAudioFiles:function(i){return this.filterAudioFiles(i).length>0;},filterVideos:function(i){return this.filterFileOfSupportedType(i,c('VideoUploadConfig').videoExtensions);},filterAudioFiles:function(i){return this.filterFileOfSupportedType(i,c('ComposerXNativeAudioUploadsConfig').audioExtensions);},filterFileOfSupportedType:function(i,j){return i.filter(function(k){var l=k.indexOf('.')!==-1?k.split('.').pop().toLowerCase():'';return j[l];});}};f.exports=h;},null);
__d('ReactComposerPhotoActions',['ReactComposerPhotoActionType','ReactComposerDispatcher','ReactComposerPhotoStore'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('ReactComposerPhotoStore');var h={startRecognizing:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,photoID:j,type:c('ReactComposerPhotoActionType').PHOTO_RECOGNITION_STARTED});},finishRecognizingPhoto:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_RECOGNITION_FINISHED,photoID:j});},finishRecognizing:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_RECOGNITION_ALL_FINISHED,photos:j,facerecWaterfallEvent:k});},addFacebox:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_ADD_FACEBOX,photoID:j,facebox:k});},tagXY:function(i,j,k,l,m,n,o){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_TAG_XY,value:k,photoID:j,source:l,subject:m,x:n,y:o});},tagFacebox:function(i,j,k,l,m){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_TAG_FACEBOX,photoID:j,faceboxID:k,subjectID:l,value:m});},untagFacebox:function(i,j,k,l){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_UNTAG_FACEBOX,photoID:j,faceboxID:k,subjectID:l});},removePhoto:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_REMOVE,photoID:j,uploadID:k});},untagSubjectFromAllPhotos:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_UNTAG_SUBJECT_FROM_ALL_PHOTOS,subjectID:j});},startPhotoEdit:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,photoID:j,type:c('ReactComposerPhotoActionType').PHOTO_EDIT_STARTED});},finishPhotoEdit:function(i){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_EDIT_FINISHED});},setPhotoBeingTagged:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,photoID:j,type:c('ReactComposerPhotoActionType').PHOTO_SET_BEING_TAGGED});},finishLoadingPhotoEdit:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoActionType').PHOTO_LOADING_EDIT_FINISHED,photoID:j});}};f.exports=h;},null);
__d('ReactComposerPhotoLegacyLimitExceededDialog',['fbt','DOM','LayerDestroyOnHide','React','ReactDOM','XUIDialog.react','XUIDialogBody.react','XUIDialogFooter.react','XUIDialogOkayButton.react','XUIDialogTitle.react'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={show:function(j){var k=h._("Too Many Photos Added"),l=h._("You can only add {maxselect} photos to a post. To add more photos, try creating an album.",[h.param('maxselect',j)]),m=c('DOM').create('div');c('ReactDOM').render(c('React').createElement(c('XUIDialog.react'),{shown:true,behaviors:{LayerDestroyOnHide:c('LayerDestroyOnHide')},width:600},c('React').createElement(c('XUIDialogTitle.react'),null,c('React').createElement('span',null,k)),c('React').createElement(c('XUIDialogBody.react'),null,l),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogOkayButton.react'),{use:'confirm',action:'cancel'}))),m);}};f.exports=i;},null);
__d('ReactComposerPhotoPrefillConfig',['React'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes;f.exports=h.shape({uploadID:h.string,photoID:h.string,thumbSrc:h.string});},null);
__d('ReactComposerPhotoUploadState',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={PHOTO_UPLOAD_ENQUEUED:'PHOTO_UPLOAD_ENQUEUED',PHOTO_UPLOAD_RESIZE_STARTED:'PHOTO_UPLOAD_RESIZE_STARTED',PHOTO_UPLOAD_RESIZE_DONE:'PHOTO_UPLOAD_RESIZE_DONE',PHOTO_UPLOAD_RESIZE_FAILED:'PHOTO_UPLOAD_RESIZE_FAILED',PHOTO_UPLOAD_UPLOADING:'PHOTO_UPLOAD_UPLOADING',PHOTO_UPLOAD_DONE:'PHOTO_UPLOAD_DONE',PHOTO_UPLOAD_FAILED:'PHOTO_UPLOAD_FAILED'};},null);
__d('ReactComposerPhotoUpload',['immutable'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('immutable').Record({id:null,error:{},filename:null,fileUpload:null,photoID:null,originalPhotoID:null,progress:null,state:null,xyTags:[],type:'photo'});},null);
__d('ReactComposerPhotoUploadStore',['ReactComposerPhotoActionType','ReactComposerPhotoUploadActionType','ReactComposerDispatcher','ReactComposerPhotoStore','ReactComposerPhotoUploadState','ReactComposerStoreBase','ReactComposerPhotoUpload','immutable','PhotoEditorSaveStates'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ReactComposerStoreBase'));i=h&&h.prototype;function j(){'use strict';var k;i.constructor.call(this,function(){return {removedIDs:c('immutable').Set(),uploads:c('immutable').List(),uploadsByID:c('immutable').Map()};},function(l){if(k&&k.$ReactComposerPhotoUploadStore1(l))return;switch(l.type){case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_ENQUEUED:k&&k.$ReactComposerPhotoUploadStore2(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_STARTED:k&&k.$ReactComposerPhotoUploadStore3(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_PROGRESS:k&&k.$ReactComposerPhotoUploadStore4(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_DONE:k&&k.$ReactComposerPhotoUploadStore5(l,c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_RESIZE_DONE);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_FAILED:k&&k.$ReactComposerPhotoUploadStore5(l,c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_RESIZE_FAILED);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_UPLOADING:k&&k.$ReactComposerPhotoUploadStore6(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_PROGRESS:k&&k.$ReactComposerPhotoUploadStore4(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_DONE:c('ReactComposerDispatcher').waitFor([c('ReactComposerPhotoStore').getDispatchToken()]);k&&k.$ReactComposerPhotoUploadStore7(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_FAILED:k&&k.$ReactComposerPhotoUploadStore8(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_REMOVE:case c('ReactComposerPhotoActionType').PHOTO_REMOVE:k&&k.$ReactComposerPhotoUploadStore9(l);break;case c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_MOVED:k&&k.$ReactComposerPhotoUploadStore10(l);break;case c('ReactComposerPhotoUploadActionType').PREFILL_PHOTOS:k&&k.$ReactComposerPhotoUploadStore11(l);break;default:}});k=this;}j.prototype.getPhotoUpload=function(k,l){'use strict';return this.$ReactComposerPhotoUploadStore12(this.getComposerData(k),l);};j.prototype.getUploadIndex=function(k,l){'use strict';return this.$ReactComposerPhotoUploadStore13(this.getComposerData(k),l);};j.prototype.getUploads=function(k){'use strict';return this.getComposerData(k).uploads;};j.prototype.getHasUploadBeenRemoved=function(k,l){'use strict';var m=this.getComposerData(k);return m.removedIDs.has(l);};j.prototype.isUploading=function(k){'use strict';return this.getComposerData(k).uploads.some(function(l){return (l.state!==c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_RESIZE_FAILED&&l.state!==c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_DONE&&l.state!==c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_FAILED);});};j.prototype.getTotalNumberOfStickersOnPhotos=function(k){'use strict';var l=0;this.getComposerData(k).uploads.forEach(function(m){var n=m.get('originalPhotoID');if(n)l+=c('PhotoEditorSaveStates').getTotalNumOfStickersOnPhoto(n);});return l;};j.prototype.$ReactComposerPhotoUploadStore2=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','filename','index','xyTags']),m=l[0],n=l[1],o=l[2],p=l[3],q=l[4];this.$ReactComposerPhotoUploadStore14(m,p,new (c('ReactComposerPhotoUpload'))({id:n,state:c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_ENQUEUED,filename:o,xyTags:q}));this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore3=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID']),m=l[0],n=l[1],o=this.getComposerData(m);this.$ReactComposerPhotoUploadStore15(o,n,function(p){return p.withMutations(function(q){return q.set('state',c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_RESIZE_STARTED).set('progress',0);});});this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore6=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','fileUpload']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerPhotoUploadStore15(p,n,function(q){return q.withMutations(function(r){return r.set('state',c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_UPLOADING).set('progress',0).set('fileUpload',o);});});this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore4=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','progress']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerPhotoUploadStore15(p,n,function(q){return q.set('progress',o);});this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore7=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','photoID']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerPhotoUploadStore15(p,n,function(q){return q.withMutations(function(r){return r.set('state',c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_DONE).set('photoID',o).set('originalPhotoID',k.originalPhotoID||o).remove('fileUpload');});});this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore8=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID']),m=l[0],n=l[1],o=this.getComposerData(m);this.$ReactComposerPhotoUploadStore15(o,n,function(p){return p.withMutations(function(q){return q.set('state',c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_FAILED).set('error',k.error);});});this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore9=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID']),m=l[0],n=l[1],o=this.getComposerData(m),p=this.$ReactComposerPhotoUploadStore13(o,n);o.uploads=o.uploads['delete'](p);o.uploadsByID=o.uploadsByID['delete'](n);for(var q=p;q<o.uploads.size;q++){var r=o.uploads.get(q).id;o.uploadsByID=o.uploadsByID.set(r,q);}o.removedIDs=o.removedIDs.add(n);this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore5=function(k,l){'use strict';var m=this.validateAction(k,['composerID','uploadID']),n=m[0],o=m[1];this.$ReactComposerPhotoUploadStore16(n,o,l);this.emitChange(n);};j.prototype.$ReactComposerPhotoUploadStore10=function(k){'use strict';var l=this.validateAction(k,['composerID','from','to']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);p.uploads=p.uploads.splice(n,1).splice(o,0,p.uploads.get(n));p.uploadsByID=p.uploads.groupBy(function(q,r){return r;}).toMap().map(function(q){return q.first().id;}).flip();this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore11=function(k){'use strict';var l=this.validateAction(k,['composerID','photos']),m=l[0],n=l[1];n.forEach(function(o,p){this.$ReactComposerPhotoUploadStore14(m,p,new (c('ReactComposerPhotoUpload'))({id:o.uploadID,photoID:o.photoID,originalPhotoID:o.photoID,state:c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_DONE}));}.bind(this));this.emitChange(m);};j.prototype.$ReactComposerPhotoUploadStore16=function(k,l,m){'use strict';var n=this.getComposerData(k);this.$ReactComposerPhotoUploadStore15(n,l,function(o){return o.set('state',m);});};j.prototype.$ReactComposerPhotoUploadStore15=function(k,l,m){'use strict';var n=this.$ReactComposerPhotoUploadStore17(k,l),o=n[0],p=n[1];k.uploads=k.uploads.set(p,m(o,p));};j.prototype.$ReactComposerPhotoUploadStore17=function(k,l){'use strict';var m=this.$ReactComposerPhotoUploadStore13(k,l);return [k.uploads.get(m),m];};j.prototype.$ReactComposerPhotoUploadStore13=function(k,l){'use strict';var m=k.uploadsByID.get(l);if(m===undefined)throw 'Upload '+l+' hasn\'t been registered';return m;};j.prototype.$ReactComposerPhotoUploadStore12=function(k,l){'use strict';var m=this.$ReactComposerPhotoUploadStore13(k,l);return k.uploads.get(m);};j.prototype.$ReactComposerPhotoUploadStore1=function(k){'use strict';if(!!c('ReactComposerPhotoUploadActionType')[k.type]){var l=k.composerID,m=k.uploadID;if(m==null)return false;return this.getHasUploadBeenRemoved(l,m);}return false;};j.prototype.$ReactComposerPhotoUploadStore14=function(k,l,m){'use strict';var n=this.getComposerData(k);n.uploads=n.uploads.splice(l,0,m);for(var o=l;o<n.uploads.size;o++){var p=n.uploads.get(o).id;n.uploadsByID=n.uploadsByID.set(p,o);}};f.exports=new j();},null);
__d('ReactComposerPhotoUploadActions',['ReactComposerPhotoUploadActionType','ReactComposerDispatcher','ReactComposerPhotoActions','ReactComposerPhotoPrefillConfig','ReactComposerPhotoUploadState','ReactComposerPhotoUploadStore'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={enqueue:function(i,j,k,l){var m=arguments.length<=4||arguments[4]===undefined?[]:arguments[4];c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_ENQUEUED,filename:k,index:l,xyTags:m});},startResizing:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,loggingData:k,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_STARTED});},progressResizing:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_PROGRESS,progress:k});},doneResizing:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,loggingData:k,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_DONE});},failResizing:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,loggingData:k,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZE_FAILED});},startUploading:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_UPLOADING,fileUpload:k});},progressUploading:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_PROGRESS,progress:k});},doneUploading:function(i,j,k,l,m,n,o,p){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,fileUpload:k,mediaLocation:p,timeToUpload:l,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_DONE,photoID:m,thumbSrc:n,originalPhotoID:o});},failUploading:function(i,j,k,l,m){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_FAILED,error:m,fileUpload:k,timeToUpload:l});},removeAllPhotoUploads:function(i){c('ReactComposerPhotoUploadStore').getUploads(i).forEach(function(j){return this.removePhotoAndPhotoUpload(i,j);}.bind(this));},removePhotoAndPhotoUpload:function(i,j){if(j.state===c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_DONE){c('ReactComposerPhotoActions').removePhoto(i,j.photoID,j.id);}else this.removePhotoUpload(i,j.id);},removePhotoUpload:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_REMOVE,uploadID:j});},photoMoved:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_MOVED,from:j,to:k});},inputClicked:function(i){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_INPUT_CLICKED});},resizerUnavailable:function(i){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RESIZER_UNAVAILABLE});},photosSelect:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,method:k,numPhotos:j,type:c('ReactComposerPhotoUploadActionType').PHOTOS_SELECT});},retryPhotoUpload:function(i){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_RETRY});},prefillPhotos:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,photos:j,type:c('ReactComposerPhotoUploadActionType').PREFILL_PHOTOS});}};f.exports=h;},null);
__d('ReactComposerVideoLegacyLimitExceededDialog',['fbt','ErrorDialog'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={show:function(){c('ErrorDialog').show(h._("Too many files"),h._("Please select only one video file at a time."));}};f.exports=i;},null);
__d('ReactComposerVideoUploadActionType',['keyMirror'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('keyMirror')({VIDEO_SET_UPLOADER:null,VIDEO_UPLOAD_ADD:null,VIDEO_UPLOAD_REMOVE:null});},null);
__d('ReactComposerVideoUploadStore',['ReactComposerStoreBase','ReactComposerVideoUploadActionType','immutable'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('immutable').Record({file:null});h=babelHelpers.inherits(k,c('ReactComposerStoreBase'));i=h&&h.prototype;function k(){'use strict';var l;i.constructor.call(this,function(){return {uploader:null,video:null};},function(m){switch(m.type){case c('ReactComposerVideoUploadActionType').VIDEO_SET_UPLOADER:l&&l.$ReactComposerVideoUploadStore1(m);break;case c('ReactComposerVideoUploadActionType').VIDEO_UPLOAD_ADD:l&&l.$ReactComposerVideoUploadStore2(m);break;case c('ReactComposerVideoUploadActionType').VIDEO_UPLOAD_REMOVE:l&&l.$ReactComposerVideoUploadStore3(m);break;default:}});l=this;}k.prototype.getUploader=function(l){'use strict';return this.getComposerData(l).uploader;};k.prototype.getVideo=function(l){'use strict';return this.getComposerData(l).video;};k.prototype.$ReactComposerVideoUploadStore1=function(l){'use strict';var m=this.validateAction(l,['composerID','uploader']),n=m[0],o=m[1],p=this.getComposerData(n);p.uploader=o;this.emitChange(n);};k.prototype.$ReactComposerVideoUploadStore2=function(l){'use strict';var m=this.validateAction(l,['composerID','file']),n=m[0],o=m[1],p=this.getComposerData(n);p.video=new j({file:o});this.emitChange(n);};k.prototype.$ReactComposerVideoUploadStore3=function(l){'use strict';var m=this.validateAction(l,'composerID'),n=this.getComposerData(m);n.video=null;n.input&&n.input.clear();this.emitChange(m);};f.exports=new k();},null);
__d('ReactComposerVideoUploadActions',['ReactComposerDispatcher','ReactComposerVideoUploadActionType','ReactComposerVideoUploadStore'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('ReactComposerVideoUploadStore');var h={setUploader:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoUploadActionType').VIDEO_SET_UPLOADER,uploader:j});},add:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoUploadActionType').VIDEO_UPLOAD_ADD,file:j});},remove:function(i){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoUploadActionType').VIDEO_UPLOAD_REMOVE});}};f.exports=h;},null);
__d('ReactComposerVideoXUploadActionType',['keyMirror'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('keyMirror')({VIDEO_UPLOAD_ENQUEUED:null,VIDEO_UPLOAD_PROGRESS:null,VIDEO_UPLOAD_UPLOADING:null,VIDEO_UPLOAD_DONE:null,VIDEO_UPLOAD_FAILED:null,VIDEO_UPLOAD_REMOVE:null,VIDEO_UPLOAD_MOVED:null,VIDEO_UPLOAD_RETRY:null,VIDEO_SET_THUMBNAIL:null});},null);
__d('ReactComposerVideoXUploadActions',['ReactComposerDispatcher','ReactComposerVideoXUploadActionType','ReactComposerVideoXUploadStore'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('ReactComposerVideoXUploadStore');var h={setUploader:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoXUploadActionType').VIDEO_SET_UPLOADER,uploader:j});},enqueue:function(i,j,k,l,m){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_ENQUEUED,filename:k,fileURL:l,index:m});},startUploading:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_UPLOADING,fileUpload:k});},progressUploading:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_PROGRESS,progress:k});},doneUploading:function(i,j,k,l){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,fileUpload:k,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_DONE,videoID:l});},failUploading:function(i,j,k,l){c('ReactComposerDispatcher').dispatch({composerID:i,uploadID:j,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_FAILED,error:l,fileUpload:k});},removeVideoUpload:function(i,j){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_REMOVE,uploadID:j});},retryVideoUpload:function(i){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_RETRY});},setVideoThumbnail:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoXUploadActionType').VIDEO_SET_THUMBNAIL,thumbSrc:k,uploadID:j});},videoMoved:function(i,j,k){c('ReactComposerDispatcher').dispatch({composerID:i,type:c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_MOVED,from:j,to:k});}};f.exports=h;},null);
__d('ReactComposerVideoXUpload',['immutable'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('immutable').Record({id:null,error:{},filename:null,fileUpload:null,fileURL:null,thumbSrc:null,photoID:null,progress:null,state:null,type:'video'});},null);
__d('ReactComposerVideoXUploadStore',['ReactComposerStoreBase','ReactComposerVideoXUploadActionType','ReactComposerVideoXUpload','ReactComposerPhotoUploadActionType','ReactComposerPhotoUploadState','ReactComposerMediaStore','ReactComposerVideoXUploader','immutable'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ReactComposerStoreBase'));i=h&&h.prototype;function j(){'use strict';var k;i.constructor.call(this,function(){return {removedIDs:c('immutable').Set(),uploads:c('immutable').List(),uploadsByID:c('immutable').Map(),uploader:null};},function(l){switch(l.type){case c('ReactComposerVideoXUploadActionType').VIDEO_SET_UPLOADER:k&&k.$ReactComposerVideoXUploadStore1(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_ENQUEUED:k&&k.$ReactComposerVideoXUploadStore2(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_UPLOADING:k&&k.$ReactComposerVideoXUploadStore3(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_PROGRESS:k&&k.$ReactComposerVideoXUploadStore4(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_DONE:k&&k.$ReactComposerVideoXUploadStore5(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_FAILED:k&&k.$ReactComposerVideoXUploadStore6(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_REMOVE:k&&k.$ReactComposerVideoXUploadStore7(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_SET_THUMBNAIL:k&&k.$ReactComposerVideoXUploadStore8(l);break;case c('ReactComposerVideoXUploadActionType').VIDEO_UPLOAD_MOVED:k&&k.$ReactComposerVideoXUploadStore9(l);break;default:}});k=this;}j.prototype.getVideoUpload=function(k,l){'use strict';return this.$ReactComposerVideoXUploadStore10(this.getComposerData(k),l);};j.prototype.getUploads=function(k){'use strict';return this.getComposerData(k).uploads;};j.prototype.getUploader=function(k){'use strict';var l=this.getComposerData(k);if(!l.uploader){var m=c('ReactComposerMediaStore').getVideoUploader(k);if(!m)throw new ReferenceError('videoUploader hasn\'t been registered');var n=new (c('ReactComposerVideoXUploader'))({composerID:k,uploaderParams:m.getUploadParameters()});this.$ReactComposerVideoXUploadStore1({composerID:k,uploader:n});}return l.uploader;};j.prototype.isUploading=function(k){'use strict';return this.getComposerData(k).uploads.some(function(l){return (l.state!==c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_DONE&&l.state!==c('ReactComposerPhotoUploadState').PHOTO_UPLOAD_FAILED);});};j.prototype.getHasUploadBeenRemoved=function(k,l){'use strict';var m=this.getComposerData(k);return m.removedIDs.has(l);};j.prototype.$ReactComposerVideoXUploadStore10=function(k,l){'use strict';var m=this.$ReactComposerVideoXUploadStore11(k,l);return k.uploads.get(m);};j.prototype.$ReactComposerVideoXUploadStore1=function(k){'use strict';var l=this.validateAction(k,['composerID','uploader']),m=l[0],n=l[1],o=this.getComposerData(m);o.uploader=n;this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore12=function(k,l,m){'use strict';var n=this.$ReactComposerVideoXUploadStore13(k,l),o=n[0],p=n[1];k.uploads=k.uploads.set(p,m(o,p));};j.prototype.$ReactComposerVideoXUploadStore13=function(k,l){'use strict';var m=this.$ReactComposerVideoXUploadStore11(k,l);return [k.uploads.get(m),m];};j.prototype.$ReactComposerVideoXUploadStore11=function(k,l){'use strict';var m=k.uploadsByID.get(l);if(m===undefined)throw new ReferenceError('Upload '+l+' hasn\'t been registered');return m;};j.prototype.$ReactComposerVideoXUploadStore2=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','filename','fileURL','index']),m=l[0],n=l[1],o=l[2],p=l[3],q=l[4];this.$ReactComposerVideoXUploadStore14(m,q,new (c('ReactComposerVideoXUpload'))({id:n,state:c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_ENQUEUED,filename:o,fileURL:p}));this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore3=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','fileUpload']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerVideoXUploadStore12(p,n,function(q){return q.withMutations(function(r){return r.set('state',c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_UPLOADING).set('progress',0).set('fileUpload',o);});});this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore4=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','progress']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerVideoXUploadStore12(p,n,function(q){return q.set('progress',o);});this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore5=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','videoID']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerVideoXUploadStore12(p,n,function(q){return q.withMutations(function(r){return r.set('state',c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_DONE).set('photoID',o).remove('fileUpload');});});this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore6=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID']),m=l[0],n=l[1],o=this.getComposerData(m);this.$ReactComposerVideoXUploadStore12(o,n,function(p){return p.withMutations(function(q){return q.set('state',c('ReactComposerPhotoUploadActionType').PHOTO_UPLOAD_FAILED).set('error',k.error);});});this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore14=function(k,l,m){'use strict';var n=this.getComposerData(k);n.uploads=n.uploads.splice(l,0,m);for(var o=l;o<n.uploads.size;o++){var p=n.uploads.get(o).id;n.uploadsByID=n.uploadsByID.set(p,o);}};j.prototype.$ReactComposerVideoXUploadStore7=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID']),m=l[0],n=l[1],o=this.getComposerData(m),p=this.$ReactComposerVideoXUploadStore11(o,n);o.uploads=o.uploads['delete'](p);o.uploadsByID=o.uploadsByID['delete'](n);for(var q=p;q<o.uploads.size;q++){var r=o.uploads.get(q).id;o.uploadsByID=o.uploadsByID.set(r,q);}o.removedIDs=o.removedIDs.add(n);this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore8=function(k){'use strict';var l=this.validateAction(k,['composerID','uploadID','thumbSrc']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);this.$ReactComposerVideoXUploadStore12(p,n,function(q){return q.set('thumbSrc',o);});this.emitChange(m);};j.prototype.$ReactComposerVideoXUploadStore9=function(k){'use strict';var l=this.validateAction(k,['composerID','from','to']),m=l[0],n=l[1],o=l[2],p=this.getComposerData(m);p.uploads=p.uploads.splice(n,1).splice(o,0,p.uploads.get(n));p.uploadsByID=p.uploads.groupBy(function(q,r){return r;}).toMap().map(function(q){return q.first().id;}).flip();this.emitChange(m);};f.exports=new j();},null);
__d('MultimediaUploadProcessingDialog.react',['fbt','React','XUIDialog.react','XUIDialogTitle.react','XUIDialogBody.react'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MultimediaUploadProcessingDialog',propTypes:{numOfVideos:i.number.isRequired},getInitialState:function(){return {dialogShown:true};},componentWillReceiveProps:function(k){if(k.show)this.setState({dialogShown:true});},_getProcessingText:function(){return this.props.numOfVideos===1?h._("The video in your post is being processed. We'll send you a notification when it's done and your post is ready to view."):h._("The videos in your post are being processed. We'll send you a notification when they're done and your post is ready to view.");},_getTitle:function(){return h._("Processing Videos");},render:function(){return (c('React').createElement(c('XUIDialog.react'),{shown:this.state.dialogShown,width:400},c('React').createElement(c('XUIDialogTitle.react'),null,this._getTitle()),c('React').createElement(c('XUIDialogBody.react'),null,this._getProcessingText())));}});f.exports=j;},null);
__d('ReactComposerVideoXUploader',['invariant','ReactComposerEvents','ReactComposerVideoXUploadActions','ReactComposerVideoXUploadStore','ReactComposerMediaFilterUtils','VideoUploader','VideoUploadProgressBar','Arbiter','DOM','JSLogger','PhotosUploadID','SubscriptionsHandler','VideoUploadFile','MultimediaUploadProcessingDialog.react','React','ReactDOM','throttle'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=250;function j(k){this.$ReactComposerVideoXUploader3=k;this.$ReactComposerVideoXUploader2=new (c('SubscriptionsHandler'))();this.$ReactComposerVideoXUploader6=0;!k.composerID?h(0):void 0;!k.uploaderParams?h(0):void 0;this.$ReactComposerVideoXUploader2.addSubscriptions(c('Arbiter').subscribe(c('ReactComposerEvents').POST_SUCCEEDED+k.composerID,c('throttle')(this.$ReactComposerVideoXUploader7,i,this)),c('Arbiter').subscribe(c('ReactComposerEvents').POST_STARTED+k.composerID,c('throttle')(this.$ReactComposerVideoXUploader8,i,this)));this.$ReactComposerVideoXUploader1=k.composerID;this.$ReactComposerVideoXUploader4=k.uploaderParams;this.$ReactComposerVideoXUploader5=c('JSLogger').create('composer');}j.prototype.upload=function(k){k.forEach(function(l){if(!c('ReactComposerMediaFilterUtils').hasVideos([l.name]))return;if(!l.uploadID)l.uploadID=c('PhotosUploadID').getNewID();this.$ReactComposerVideoXUploader9({uploadID:l.uploadID,fileName:l.name,fileURL:URL.createObjectURL(l)});this.uploadVideo(l);}.bind(this));};j.prototype.uploadVideo=function(k){var l=JSON.parse(JSON.stringify(this.$ReactComposerVideoXUploader4)),m=new (c('VideoUploader'))(l),n=c('VideoUploadFile').fromFile(k);this.$ReactComposerVideoXUploader2.addSubscriptions(m.subscribe('upload-started',this.$ReactComposerVideoXUploader10.bind(this,k)),m.subscribe('upload-progressed',this.$ReactComposerVideoXUploader11.bind(this,k)),m.subscribe('upload-failed',this.$ReactComposerVideoXUploader12.bind(this,k)),m.subscribe('upload-finished',this.$ReactComposerVideoXUploader13.bind(this,k)));try{m.upload(n);}catch(o){this.$ReactComposerVideoXUploader5.error('error_send_unpublished_files',o);throw o;}};j.prototype.$ReactComposerVideoXUploader9=function(k){c('ReactComposerVideoXUploadActions').enqueue(this.$ReactComposerVideoXUploader1,k.uploadID,k.fileName,k.fileURL,c('ReactComposerVideoXUploadStore').getUploads(this.$ReactComposerVideoXUploader1).size);};j.prototype.$ReactComposerVideoXUploader10=function(k,l){c('ReactComposerVideoXUploadActions').startUploading(this.$ReactComposerVideoXUploader1,k.uploadID,k);};j.prototype.$ReactComposerVideoXUploader11=function(k,l,m){var n=c('VideoUploadProgressBar').computeProgress(m.start_offset,m.sent_bytes,m.file_size,0,0);c('ReactComposerVideoXUploadActions').progressUploading(this.$ReactComposerVideoXUploader1,k.uploadID,Math.round(n));};j.prototype.$ReactComposerVideoXUploader13=function(k,l,m){c('ReactComposerVideoXUploadActions').doneUploading(this.$ReactComposerVideoXUploader1,k.uploadID,k,m.video_id);};j.prototype.$ReactComposerVideoXUploader12=function(k,l,m){var n={code:m.error_code,description:m.error_description,summary:m.error_summary,transient:m.error_is_transient};c('ReactComposerVideoXUploadActions').failUploading(this.$ReactComposerVideoXUploader1,k.uploadID,k,n);};j.prototype.$ReactComposerVideoXUploader7=function(){var k=c('DOM').create('div');c('DOM').appendContent(document.body,k);if(this.$ReactComposerVideoXUploader6>0)c('ReactDOM').render(c('React').createElement(c('MultimediaUploadProcessingDialog.react'),{numOfVideos:this.$ReactComposerVideoXUploader6}),k);};j.prototype.$ReactComposerVideoXUploader8=function(){this.$ReactComposerVideoXUploader6=c('ReactComposerVideoXUploadStore').getUploads(this.$ReactComposerVideoXUploader1).size;};j.prototype.destroy=function(){this.$ReactComposerVideoXUploader2.release();};f.exports=j;},null);
__d('ReactComposerMediaUtils',['ReactComposerMediaFilterUtils','ReactComposerPhotoActions','ReactComposerPhotoLegacyLimitExceededDialog','ReactComposerPhotoUploadActions','ReactComposerPhotoUploadStore','ReactComposerVideoLegacyLimitExceededDialog','ReactComposerVideoUploadStore','ReactComposerVideoXUploadStore','ReactComposerVideoUploadActions','Bootloader','Map','PUWMethods','VideoUploadFeatureDetector','VideoUploadConfig','VideoUploadFile','uniqueID'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={clearInput:function(i){var j=this.getFileNamesFromFileInput(i.getInput());if(!h.hasVideos(j))i.clear();},getFileNames:function(i){var j=[];for(var k=0;k<i.length;k++)j.push(i[k].name);return j;},getFileNamesFromFileInput:function(i){if(c('VideoUploadFeatureDetector').supportsFileAPI()){return this.getFileNames(i.files);}else return [i.value.split('/').pop().split('\\').pop()];},hasVideos:function(i){return c('ReactComposerMediaFilterUtils').hasVideos(i);},hasAudioFiles:function(i){return c('ReactComposerMediaFilterUtils').hasAudioFiles(i);},filterVideos:function(i){return c('ReactComposerMediaFilterUtils').filterVideos(i);},filterAudioFiles:function(i){return c('ReactComposerMediaFilterUtils').filterAudioFiles(i);},filterFileOfSupportedType:function(i,j){return c('ReactComposerMediaFilterUtils').filterFileOfSupportedType(i,j);},uploadVideo:function(i,j){if(c('ReactComposerPhotoUploadStore').getUploads(i).size>0)c('ReactComposerPhotoUploadActions').removeAllPhotoUploads(i);c('ReactComposerVideoUploadActions').add(i,j);},uploadPhotos:function(i,j,k,l,m,n){var o=k.isUploadLimitExceeded(l,j);if(o){c('ReactComposerPhotoLegacyLimitExceededDialog').show(k.getMaxSelectableFilesCount(l));return;}var p=j?j.length:1;if(p<1)return;if(c('ReactComposerVideoUploadStore').getVideo(i))c('ReactComposerVideoUploadActions').remove(i);c('ReactComposerPhotoUploadActions').photosSelect(i,p,m);n&&n();},uploadMultiMediaFromTarget:function(i,j,k,l,m){l.upload(Array.from(j.files));this.uploadPhotos(i,j.files,k,m,c('PUWMethods').FILE_SELECTOR,function(){k&&k.upload(j);});},uploadPhotosOrVideoFromTarget:function(i,j,k,l,m){var n=this.getFileNamesFromFileInput(j);if(this.hasVideos(n)){if(j.files&&j.files.length>1){if(!c('VideoUploadConfig').allowMultimedia){c('ReactComposerVideoLegacyLimitExceededDialog').show();return;}this.uploadMultiMediaFromTarget(i,j,k,l,m);}else if(c('ReactComposerVideoXUploadStore').getUploads(i).size>0){this.uploadMultiMediaFromTarget(i,j,k,l,m);}else this.uploadVideo(i,c('VideoUploadFile').fromFileInput(j));}else this.uploadPhotos(i,j.files,k,m,c('PUWMethods').FILE_SELECTOR,function(){k&&k.upload(j);});},uploadMultiMedia:function(i,j,k,l,m){var n=arguments.length<=5||arguments[5]===undefined?c('PUWMethods').FILE_SELECTOR:arguments[5];l.upload(j);var o=j.filter(function(p){return !this.hasVideos([p.name]);}.bind(this));this.uploadPhotos(i,o,k,m,n,function(){o.forEach(function(p){p.uploadID=c('uniqueID')();p.filename='';});k.enqueueAsyncUploadRequest(i,o,{},{});});},uploadPhotosOrVideo:function(i,j,k,l,m){var n=arguments.length<=5||arguments[5]===undefined?c('PUWMethods').FILE_SELECTOR:arguments[5],o=this.getFileNames(j);if(this.hasVideos(o)){if(j&&j.length>1){if(!c('VideoUploadConfig').allowMultimedia){c('ReactComposerVideoLegacyLimitExceededDialog').show();return;}this.uploadMultiMedia(i,j,k,l,m);}else if(c('ReactComposerVideoXUploadStore').getUploads(i).size>0){this.uploadMultiMedia(i,j,k,l,m);}else this.uploadVideo(i,c('VideoUploadFile').fromFile(j[0]));}else this.uploadPhotos(i,j,k,m,n,function(){j.forEach(function(p){p.uploadID=c('uniqueID')();p.filename='';});k.enqueueAsyncUploadRequest(i,j,{},{});});},onImageEdited:function(i,j,k,l){if(k==='AttachmentsPhotoEditor/newImage'+i){var m=c('ReactComposerPhotoUploadStore').getUploads(i),n=m.find(function(r){return (r.photoID===l.fbid||r.originalPhotoID===l.fbid);}),o=c('ReactComposerPhotoUploadStore').getUploadIndex(i,n.id);c('ReactComposerPhotoActions').removePhoto(i,n.photoID,n.id);var p=l.blob;p.uploadID=c('uniqueID')();p.filename=n.filename;var q=new (c('Map'))([[p.uploadID,o]]);j&&j.enqueueAsyncUploadRequest(i,[p],{data:{original_fbid:l.fbid,xy_tags:l.xyTags,stickers:l.stickers,text_overlays:l.textOverlays,has_crop:l.hasCrop,has_filter:l.hasFilter},indexMap:q},{xyTags:l.xyTags});c('ReactComposerPhotoUploadActions').photosSelect(i,1,c('PUWMethods').METHOD_EDITOR);}else if(k==='AttachmentsPhotoEditor/tagsUpdated'+i)h.handleFaceboxAndXYTags(i,l.fbid,l.xyTags);c('ReactComposerPhotoActions').finishPhotoEdit(i);},handleFaceboxAndXYTags:function(i,j,k){k.forEach(function(l){if(l.from_facebox){c('ReactComposerPhotoActions').tagFacebox(i,j,l.facebox,l.subject,l.name);}else c('ReactComposerPhotoActions').tagXY(i,j,l.name,l.source,l.subject,l.x,l.y);});},handleXYTagsOnly:function(i,j,k){k.forEach(function(l){if(l.from_facebox){return;}else c('ReactComposerPhotoActions').tagXY(i,j,l.name,l.source,l.subject,l.x,l.y);});},handleSpecialMediaUpload:function(event,i,j,k){var l=c('ReactComposerVideoXUploadStore').getUploads(k.composerID).size>0||c('ReactComposerPhotoUploadStore').getUploads(k.composerID).size>0;if(!j.useVideoUploadDialog||l)return false;var m=event.target;if(!m.files||m.files.length!==1)return false;var n=h.getFileNamesFromFileInput(m),o=h.hasVideos(n),p=h.hasAudioFiles(n);if(p&&j.canUploadAudio){c('Bootloader').loadModules(["ComposerXAudioUploadDialogController"],function(q){return (q.showDialog({targetID:k.targetID,fileInput:i}));});return true;}else if(o){c('Bootloader').loadModules(["ComposerXVideoUploadDialogController"],function(q){return (q.showDialog({targetID:k.targetID,fileInput:i,composerEntryPointRef:k.composerType,canShowOptimisticPost:j.shouldShowOptimisticVideoPost}));});return true;}return false;},isMultimediaPost:function(i){return (c('ReactComposerVideoXUploadStore').getUploads(i).size>0&&c('ReactComposerPhotoUploadStore').getUploads(i).size>0);}};f.exports=h;},null);
__d('XComposerPhotoUploader',['regeneratorRuntime','Promise','AsyncUploadRequest','ReactComposerMediaUtils','FileInputUploader','JSLogger','PhotosMimeType','PhotosUploadID','ImageMetadata','SphericalImage','curry','emptyFunction','performanceNow'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i){this.$XComposerPhotoUploader2=i.uploadData||{};this.$XComposerPhotoUploader1=i.uploadEndpoint;this.$XComposerPhotoUploader3=i.retryLimit;this.$XComposerPhotoUploader4=i.concurrentLimit;this.$XComposerPhotoUploader5=i.resizer;this.$XComposerPhotoUploader6=i.onUploadEnqueued||c('emptyFunction');this.$XComposerPhotoUploader7=i.onUploadsEnqueued||c('emptyFunction');this.$XComposerPhotoUploader8=i.onResizeStart||c('emptyFunction');this.$XComposerPhotoUploader11=i.onResizeProgress||c('emptyFunction');this.$XComposerPhotoUploader9=i.onResizeSuccess||c('emptyFunction');this.$XComposerPhotoUploader10=i.onResizeFailure||c('emptyFunction');this.$XComposerPhotoUploader12=i.onUploadSent||c('emptyFunction');this.$XComposerPhotoUploader13=i.onUploadStart||c('emptyFunction');this.$XComposerPhotoUploader14=i.onUploadProgress||c('emptyFunction');this.$XComposerPhotoUploader15=i.onUploadSuccess||c('emptyFunction');this.$XComposerPhotoUploader16=i.onUploadFailure||c('emptyFunction');this.$XComposerPhotoUploader17=c('JSLogger').create('composer');this.$XComposerPhotoUploader18=i.gks||{};}h.prototype.upload=function(i){var j=Object.assign({},this.$XComposerPhotoUploader2),k=null;if(!this.$XComposerPhotoUploader19(i)){var l=c('PhotosUploadID').getNewID();i.uploadID=l;j.upload_id=l;this.$XComposerPhotoUploader6({uploadID:l,fileName:i.value.split('/').pop().split('\\').pop()});}else{k=Array.from(i.files);k=k.filter(function(o){return !c('ReactComposerMediaUtils').hasVideos([o.name]);});if(k.length===0)return;k.forEach(function(o){if(!o.uploadID)o.uploadID=c('PhotosUploadID').getNewID();this.$XComposerPhotoUploader6({uploadID:o.uploadID,fileName:o.name});}.bind(this));}this.$XComposerPhotoUploader7();var m=new (c('FileInputUploader'))(i).setURI(this.$XComposerPhotoUploader1).setData(j).setAllowCrossOrigin(true).setNetworkErrorRetryLimit(this.$XComposerPhotoUploader3).setUploadInParallel(true);if(k&&k.length>0){m.setFiles({farr:k});if(this.$XComposerPhotoUploader5)m.setPreprocessHandler(this.$XComposerPhotoUploader20.bind(this));if(this.$XComposerPhotoUploader4)m.setConcurrentLimit(this.$XComposerPhotoUploader4);}m.subscribe('progress',function(o,p){return (this.$XComposerPhotoUploader14(this.$XComposerPhotoUploader21(p,i),p));}.bind(this));m.subscribe('failure',function(o,p){return (this.$XComposerPhotoUploader16(this.$XComposerPhotoUploader21(p,i),p,k));}.bind(this));m.subscribe('start',function(o,p){return (this.$XComposerPhotoUploader13(this.$XComposerPhotoUploader21(p,i),p));}.bind(this));m.subscribe('success',function(o,p){return (this.$XComposerPhotoUploader15(this.$XComposerPhotoUploader21(p,i),p));}.bind(this));try{m.send();this.$XComposerPhotoUploader12(i);}catch(n){this.$XComposerPhotoUploader17.error('error_send_unpublished_files',n);throw n;}};h.prototype.getAsyncUploadRequest=function(i,j){var k=new (c('AsyncUploadRequest'))().setData(Object.assign({},j&&j.data,this.$XComposerPhotoUploader2)).setFiles({farr:i}).setAllowCrossOrigin(true).setURI(this.$XComposerPhotoUploader1);if(this.$XComposerPhotoUploader4)k.setLimit(this.$XComposerPhotoUploader4);if(this.$XComposerPhotoUploader5)k.setPreprocessHandler(this.$XComposerPhotoUploader20.bind(this));k.subscribe('start',function(l,m){return (this.$XComposerPhotoUploader13(m.getFile().uploadID,{upload:m}));}.bind(this));k.subscribe('progress',function(l,m){return (this.$XComposerPhotoUploader14(m.getFile().uploadID,{upload:m,event:m.getProgressEvent()}));}.bind(this));k.subscribe('success',function(l,m){return (this.$XComposerPhotoUploader15(m.getFile().uploadID,{upload:m,response:m.getResponse()}));}.bind(this));k.subscribe('failure',function(l,m){return (this.$XComposerPhotoUploader16(m.getFile().uploadID,{upload:m,response:m.getResponse()},i));}.bind(this));return k;};h.prototype.$XComposerPhotoUploader21=function(i,j){if(i.upload){return i.upload.getFile().uploadID;}else return j.uploadID;};h.prototype.$XComposerPhotoUploader20=function(i,j){(function k(){return c('regeneratorRuntime').async(function l(m){while(1)switch(m.prev=m.next){case 0:m.next=2;return c('regeneratorRuntime').awrap(this.$XComposerPhotoUploader22(i,j));case 2:return m.abrupt('return',m.sent);case 3:case 'end':return m.stop();}},null,this);}).bind(this)().done();};h.prototype.$XComposerPhotoUploader23=function i(j){return c('regeneratorRuntime').async(function k(l){while(1)switch(l.prev=l.next){case 0:l.next=2;return c('regeneratorRuntime').awrap(c('SphericalImage').isSphericalBlob(j));case 2:return l.abrupt('return',l.sent);case 3:case 'end':return l.stop();}},null,this);};h.prototype.$XComposerPhotoUploader24=function(i){return this.$XComposerPhotoUploader25(this.$XComposerPhotoUploader5.resizeBlob.bind(this.$XComposerPhotoUploader5),i);};h.prototype.$XComposerPhotoUploader26=function(i){return this.$XComposerPhotoUploader25(this.$XComposerPhotoUploader5.resize360Blob.bind(this.$XComposerPhotoUploader5),i);};h.prototype.$XComposerPhotoUploader25=function(i,j){var k=c('curry')(this.$XComposerPhotoUploader11,j.uploadID);return new (c('Promise'))(function(l,m){i(j,function(n,o,p){if(n){m(n);}else if(p){l(null);}else l(o);},k);});};h.prototype.$XComposerPhotoUploader22=function i(j,k){var l,m,n,o,p,q;return c('regeneratorRuntime').async(function r(s){while(1)switch(s.prev=s.next){case 0:l=j.getFile();if(!(!l||!c('PhotosMimeType').isJpeg(l.type))){s.next=3;break;}return s.abrupt('return',k(j));case 3:m=c('performanceNow')();this.$XComposerPhotoUploader8(l);s.prev=5;n=false;if(!this.$XComposerPhotoUploader18.spherical_photo_upload){s.next=11;break;}s.next=10;return c('regeneratorRuntime').awrap(this.$XComposerPhotoUploader23(l));case 10:n=s.sent;case 11:if(!n){s.next=17;break;}s.next=14;return c('regeneratorRuntime').awrap(this.$XComposerPhotoUploader26(l));case 14:o=s.sent;s.next=20;break;case 17:s.next=19;return c('regeneratorRuntime').awrap(this.$XComposerPhotoUploader24(l));case 19:o=s.sent;case 20:if(o){o.uploadID=l.uploadID;o.name=l.name;j.setFile(o);}p=o===null;j.getFile().filename=l.name;this.$XComposerPhotoUploader9(l,o||l,p,c('performanceNow')()-m);s.next=31;break;case 26:s.prev=26;s.t0=s['catch'](5);q=c('performanceNow')()-m;this.$XComposerPhotoUploader10(l,o||l,s.t0,q);case 31:k(j);case 32:case 'end':return s.stop();}},null,this,[[5,26]]);};h.prototype.$XComposerPhotoUploader19=function(i){return !!i.files&&c('AsyncUploadRequest').isSupported();};f.exports=h;},null);