{"version":3,"sources":["canvid.js"],"names":["root","factory","module","exports","define","amd","canvid","this","params","loadImages","imageList","callback","checkCallback","imagesToLoad","images","Object","keys","length","key","Image","onload","onerror","src","initCanvas","canvas","document","createElement","width","_opts","height","classList","add","el","appendChild","getContext","hideChildren","forEach","call","children","child","contains","style","display","removeCanvid","removeChild","reqAnimFrame","window","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","setTimeout","hasCanvas","elem","isFunction","obj","constructor","apply","merge","i","arguments","hasOwnProperty","defaultOptions","selector","firstPlay","control","play","console","log","querySelector","warn","videos","err","ctx","reverse","fps","frame","wait","drawFrame","curFrame","opts","frames","loops","playing","onEnd","delay","f","fx","Math","floor","cols","frameWidth","fy","frameHeight","clearRect","drawImage","img","pause","ceil","curFps","resume","isPlaying","destroy","getCurrentFrame","setCurrentFrame","frameNumber","loaded","srcGif","fallbackImage"],"mappings":"CAAC,SAASA,EAAMC,GACU,mBAAXC,SAA0BA,OAAOC,QACxCD,OAAOC,QAAUF,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GAEXD,EAAKM,OAASL,KAEpBM,KAAM,WAEJ,QAASD,GAAOE,GAiIZ,QAASC,GAAWC,EAAWC,GAe3B,QAASC,KACLC,IACqB,IAAjBA,GACAF,EAAS,KAAMG,GAjBvB,GAAIA,MACAD,EAAeE,OAAOC,KAAKN,GAAWO,MAE1C,IAAoB,IAAjBJ,EACC,MAAOF,GAAS,gDAGpB,KAAK,GAAIO,KAAOR,GACZI,EAAOI,GAAO,GAAIC,OAClBL,EAAOI,GAAKE,OAASR,EACrBE,EAAOI,GAAKG,QAAUV,EACtBG,EAAOI,GAAKI,IAAMZ,EAAUQ,GAAKI,IAWzC,QAASC,KACL,GAAIC,GAASC,SAASC,cAAc,SAOpC,OANAF,GAAOG,MAAQC,EAAMD,MACrBH,EAAOK,OAASD,EAAMC,OACtBL,EAAOM,UAAUC,IAAI,UAErBC,EAAGC,YAAYT,G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