From cd5a0d0e8bf15c9ff79dbcb712744779cd883605 Mon Sep 17 00:00:00 2001 From: Jonas Kamsker Date: Mon, 17 May 2021 23:02:09 +0200 Subject: [PATCH] Updates --- asset-manifest.json | 6 +++--- index.html | 2 +- static/js/main.3c25dbdb.chunk.js | 2 -- static/js/main.3c25dbdb.chunk.js.map | 1 - static/js/main.c4bf3b9b.chunk.js | 2 ++ static/js/main.c4bf3b9b.chunk.js.map | 1 + 6 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 static/js/main.3c25dbdb.chunk.js delete mode 100644 static/js/main.3c25dbdb.chunk.js.map create mode 100644 static/js/main.c4bf3b9b.chunk.js create mode 100644 static/js/main.c4bf3b9b.chunk.js.map diff --git a/asset-manifest.json b/asset-manifest.json index 4111d29..341268b 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "/static/css/main.b6f0cd93.chunk.css", - "main.js": "/static/js/main.3c25dbdb.chunk.js", - "main.js.map": "/static/js/main.3c25dbdb.chunk.js.map", + "main.js": "/static/js/main.c4bf3b9b.chunk.js", + "main.js.map": "/static/js/main.c4bf3b9b.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.8ef242c9.js", "runtime-main.js.map": "/static/js/runtime-main.8ef242c9.js.map", "static/css/2.d1c75e18.chunk.css": "/static/css/2.d1c75e18.chunk.css", @@ -18,6 +18,6 @@ "static/css/2.d1c75e18.chunk.css", "static/js/2.b8e71051.chunk.js", "static/css/main.b6f0cd93.chunk.css", - "static/js/main.3c25dbdb.chunk.js" + "static/js/main.c4bf3b9b.chunk.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 7b3e058..6853a89 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Audible Tools
\ No newline at end of file +Audible Tools
\ No newline at end of file diff --git a/static/js/main.3c25dbdb.chunk.js b/static/js/main.3c25dbdb.chunk.js deleted file mode 100644 index d74e25d..0000000 --- a/static/js/main.3c25dbdb.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpmaterial-pg-01"]=this["webpackJsonpmaterial-pg-01"]||[]).push([[0],{119:function(e,t,a){},159:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(10),c=a.n(i);a(119),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var o=a(70),s=a(11),l=a.n(s),u=a(25),d=a(21),p=a(22),h=a(31),m=a(30),f=a(6),j=a(206),b=a(194),v=a(200),x=a(201),y=a(198),O=a(203),g=a(94),k=a.n(g),C=a(101),w=a(199),_=a(97),S=a(161),B=a(69),F=a.n(B),A=a(95),I=a.n(A),N=a(40),D=a(5),R=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e))._handleUpload=n._handleUpload.bind(Object(N.a)(n)),n}return Object(p.a)(a,[{key:"_handleUpload",value:function(e){var t=e.target.files[0];this.props.onChange(t),this.fileInput.value=null}},{key:"render",value:function(){var e=this;return Object(D.jsxs)("div",{style:this.props.style,children:[Object(D.jsx)("input",{accept:this.props.accept,type:"file",style:{display:"none"},onChange:this._handleUpload,ref:function(t){return e.fileInput=t}}),r.a.cloneElement(this.props.children,{onClick:function(){return e.fileInput.click()}})]})}}]),a}(r.a.Component),T=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e))._validate=n._validate.bind(Object(N.a)(n)),n}return Object(p.a)(a,[{key:"_validate",value:function(e){var t=this.props,a=t.onError,n=t.onChange,r=t.maxSize,i=t.extensions;if(e){if(i){var c=e.name.split(".").pop().toLowerCase();if(!i.map((function(e){return e.toLowerCase()})).includes(c))return void a("Must upload a file of type: ".concat(i.join(" or ")))}var o=1e6*r;e.size>o?a("File size must be less than ".concat(r," MB.")):n(e)}else a("Failed to upload a file.")}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.style,n=this.props.extensions.map((function(e){return".".concat(e)})).join(",");return Object(D.jsx)(R,{onChange:this._validate,style:a,accept:n,children:t})}}]),a}(r.a.Component);T.defaultProps={maxSize:2};var U=T,z=a(58),L=a(205),H=a(196),W=a(197),E=a(93),P=a.n(E),M=a(204),q=a(208),V=a(193),J=a(189),X=a(192);function G(e){var t=e.outputFormat,a=e.setOutputFormat,n=e.style;return Object(D.jsxs)(J.a,{component:"fieldset",style:n,children:[Object(D.jsx)(X.a,{component:"legend",children:"Output Format"}),Object(D.jsxs)(q.a,{"aria-label":"format",name:"format",value:t,onChange:function(e){a(e.target.value)},children:[Object(D.jsx)(V.a,{value:"m4b",control:Object(D.jsx)(M.a,{}),label:"AAC m4b"}),Object(D.jsx)(V.a,{value:"flac",control:Object(D.jsx)(M.a,{}),label:"FLAC hq"}),Object(D.jsx)(V.a,{value:"mp3",control:Object(D.jsx)(M.a,{}),label:"Lame mp3"})]})]})}function K(e){var t=e.operatingSystem,a=e.setOperatingSystem,n=e.style;return Object(D.jsxs)(J.a,{component:"fieldset",style:n,children:[Object(D.jsx)(X.a,{component:"legend",children:"Operating System"}),Object(D.jsxs)(q.a,{"aria-label":"format",name:"format",value:t,onChange:function(e){return a(e.target.value)},children:[Object(D.jsx)(V.a,{value:"win",control:Object(D.jsx)(M.a,{}),label:"Windows"}),Object(D.jsx)(V.a,{value:"linux",control:Object(D.jsx)(M.a,{}),label:"Linux"}),Object(D.jsx)(V.a,{value:"osx",control:Object(D.jsx)(M.a,{}),label:"Mac"})]})]})}var Y=a(98),$=a(99),Q=a(75),Z=function(e,t,a){var n=document.createElement("a");document.body.appendChild(n);var r=new Blob([e.buffer],{type:"audio/"+a}),i=window.URL.createObjectURL(r);n.href=i,n.download=t,n.click(),window.URL.revokeObjectURL(i)},ee=function(e,t,a,n){var r=[{format:"m4b",codec:"copy"},{format:"flac",codec:"flac"},{format:"mp3",codec:"libmp3lame"}].filter((function(e){return e.format===a}))[0].codec;return["-y","-activation_bytes",n,"-i",e.name,"-c:a",r,"-vn",t]},te=function(){var e=Object(u.a)(l.a.mark((function e(t,a,n,r,i){var c,o,s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=Object(Q.createFFmpeg)({log:!0,progress:function(e){var t=e.ratio;i("Complete: ".concat((100*t).toFixed(2),"%"))}}),o=ee(t,a,n,r),i("Loading ffmpeg-core.js"),e.next=5,c.load();case 5:return i("Start transcoding"),e.t0=c,e.t1=t.name,e.next=10,Object(Q.fetchFile)(t);case 10:return e.t2=e.sent,e.t0.FS.call(e.t0,"writeFile",e.t1,e.t2),e.next=14,c.run.apply(c,Object($.a)(o));case 14:i("Complete transcoding"),s=c.FS("readFile",a),Z(s,a,n);case 17:case"end":return e.stop()}}),e)})));return function(t,a,n,r,i){return e.apply(this,arguments)}}(),ae=function(e){var t=e.file,a=e.activationBytes,r=e.outputFormat,i=Object(n.useState)("Click Start to transcode"),c=Object(Y.a)(i,2),o=c[0],s=c[1],l=!(t&&a&&r);return Object(D.jsxs)("div",{children:[Object(D.jsx)(b.a,{onClick:function(){var e=t.name.split(".").slice(0,-1).join("."),n="".concat(e="input"===e?"output":e,".").concat(r);return te(t,n,r,a,s)},variant:"contained",color:"primary",disabled:l,children:"Convert in Browser"}),Object(D.jsx)(C.a,{children:o})]})},ne=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e)).DarkerDisabledTextField=Object(f.a)({root:{marginRight:8,"& .MuiInputBase-root.Mui-disabled":{color:"rgba(0, 0, 0, 0.6)"}}})(x.a),n.setExpanded=function(e){return n.setState({expanded:e})},n.handleChange=function(e){return function(t,a){n.setExpanded(!!a&&e)}},n.getCommand=function(){var e,t=n.state,a=t.outputFormat,r=t.operatingSystem,i=n.props,c=i.fileName,o=i.activationBytes;o=null!==(e=o)&&void 0!==e?e:"00000000";var s=c.split(".").slice(0,-1).join(".");s="input"==s?"output":s;var l=[{os:"win",cmd:"ffmpeg.exe",discriminator:'"'},{os:"linux",cmd:"./ffmpeg",discriminator:"'"},{os:"osx",cmd:"./ffmpeg",discriminator:"'"}].filter((function(e){return e.os==r}))[0],u=[{format:"m4b",codec:"copy"},{format:"flac",codec:"flac"},{format:"mp3",codec:"libmp3lame"}].filter((function(e){return e.format==a}))[0].codec,d=l.cmd,p=l.discriminator;return"".concat(d," -y")+" -activation_bytes ".concat(o," -i ").concat(p,".\\").concat(c).concat(p)+" -map_metadata 0 -id3v2_version 3"+" -codec:a ".concat(u)+" -vn ".concat(p).concat(s,".").concat(a).concat(p)},n.state={expanded:"",outputFormat:"m4b",operatingSystem:"win"},n}return Object(p.a)(a,[{key:"render",value:function(){var e=this,t=this.props,a=t.classes,n=t.file,r=t.activationBytes,i=this.state,c=i.expanded,o=i.outputFormat,s=i.operatingSystem;return Object(D.jsx)("div",{className:a.root,children:Object(D.jsxs)(L.a,{expanded:"panel2"===c,onChange:this.handleChange("panel2"),children:[Object(D.jsxs)(H.a,{expandIcon:Object(D.jsx)(P.a,{}),"aria-controls":"panel2bh-content",id:"panel2bh-header",children:[Object(D.jsx)(C.a,{className:a.heading,children:"Command and Convert"}),Object(D.jsx)(C.a,{className:a.secondaryHeading,children:"Generate ffmpeg command or convert in browser"})]}),Object(D.jsxs)(W.a,{style:{display:"block"},children:[Object(D.jsx)(G,{outputFormat:o,setOutputFormat:function(t){return e.setState({outputFormat:t})}}),Object(D.jsx)(K,{operatingSystem:s,setOperatingSystem:function(t){return e.setState({operatingSystem:t})},style:{paddingLeft:"20px"}}),Object(D.jsx)(this.DarkerDisabledTextField,{value:this.getCommand(),disabled:!0,multiline:!0,variant:"outlined",margin:"normal",fullWidth:!0,id:"activationBytes",label:"cmd",name:"activationBytes",autoComplete:"activationBytes","aria-readonly":!0,fontSize:5,InputProps:{readOnly:!0,endAdornment:Object(D.jsx)(z.CopyToClipboard,{text:this.getCommand(),children:Object(D.jsx)(S.a,{children:Object(D.jsx)(F.a,{})})})}}),Object(D.jsx)(ae,{file:n,activationBytes:r,outputFormat:o})]})]})})}}]),a}(r.a.Component),re=Object(f.a)((function(e){return{root:{width:"100%"},heading:{fontSize:e.typography.pxToRem(15),flexBasis:"33.33%",flexShrink:0},secondaryHeading:{fontSize:e.typography.pxToRem(15),color:e.palette.text.secondary}}}))(ne),ie=(a(147),a(47)),ce=a.n(ie),oe=function(){function e(){Object(d.a)(this,e),this.__fixed_key=[119,33,77,75,25,106,135,205,82,0,69,253,32,165,29,103]}return Object(p.a)(e,[{key:"__hexToBytes",value:function(e){for(var t=[],a=0;a>>4).toString(16)),t.push((15&n).toString(16))}return t.join("")}},{key:"__HashData",value:function(){var e=Object(u.a)(l.a.mark((function e(t){var a,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Uint8Array(t),e.next=3,crypto.subtle.digest("SHA-1",a);case 3:return n=e.sent,e.abrupt("return",Array.from(new Uint8Array(n)));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"CalculateChecksum",value:function(){var e=Object(u.a)(l.a.mark((function e(t){var a,n,r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.__hexToBytes(t),e.next=3,this.__HashData(this.__fixed_key.concat(a));case 3:return n=e.sent,e.next=6,this.__HashData(this.__fixed_key.concat(n).concat(a));case 6:return r=e.sent,e.next=9,this.__HashData(n.slice(0,16).concat(r.slice(0,16)));case 9:return i=e.sent,e.abrupt("return",this.__bytesToHex(i));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}],[{key:"CalculateChecksum",value:function(){var t=Object(u.a)(l.a.mark((function t(a){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.Instance.CalculateChecksum(a));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}();oe.Instance=new oe;var se=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e)).DarkerDisabledTextField=Object(f.a)({root:{marginRight:8,"& .MuiInputBase-root.Mui-disabled":{color:"rgba(0, 0, 0, 0.6)"}}})(x.a),n.Copyright=function(){return Object(D.jsxs)(C.a,{variant:"body2",color:"textSecondary",align:"center",children:["Copyright \xa9 ",Object(D.jsx)(y.a,{color:"inherit",href:"https://audible-tools.github.io/",children:"audible-tools"})," ",(new Date).getFullYear(),"."]})},n.setChecksum=function(e){e.length>40||n.setState({checksum:e})},n.isChecksumValid=function(){var e=n.state.checksum;return RegExp("[a-f0-9]{40}").test(e)},n.isInputInvalid=function(){var e=n.state.checksum;return!(!e||""===e)&&!n.isChecksumValid()},n.addNotification=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ie.store.addNotification({message:e,type:t?"success":"danger",insert:"bottom-left",container:"top-full",animationIn:["animate__animated","animate__fadeIn"],animationOut:["animate__animated","animate__fadeOut"],dismiss:{duration:3e3,onScreen:!1}})},n.requestActivationBytes=Object(u.a)(l.a.mark((function e(){var t,a,r,i,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.state.checksum,e.prev=1,e.next=4,fetch("https://aax.api.j-kit.me/api/v2/activation/"+t);case 4:return a=e.sent,e.next=7,a.json();case 7:if(r=e.sent,i=r.success,c=r.activationBytes,!0===i){e.next=13;break}return n.setState({activationBytes:"UNKNOWN"}),n.addNotification("An error occured while resolving the activation bytes, please check your inputs",!1),e.abrupt("return");case 13:if(!0!==i){e.next=23;break}return e.next=16,oe.CalculateChecksum(c);case 16:if(e.sent!=t){e.next=21;break}return n.setState({activationBytes:c}),n.addNotification("Successfully resolved the activation bytes"),e.abrupt("return");case 21:n.setState({activationBytes:"API ERROR"}),n.addNotification("An unexpected error occured while resolving the activation bytes, please try again",!1);case 23:e.next=29;break;case 25:e.prev=25,e.t0=e.catch(1),n.setState({activationBytes:e.t0}),n.addNotification("An error occured while resolving the activation bytes, please check your inputs",!1);case 29:case"end":return e.stop()}}),e,null,[[1,25]])}))),n.acceptFiles=function(){var e=Object(u.a)(l.a.mark((function e(t){var a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t[0],e.next=3,n.acceptFile(a);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.acceptFile=function(){var e=Object(u.a)(l.a.mark((function e(t){var a,r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({fileName:t.name,file:t}),a=t.slice(653,673),e.t0=n,e.next=5,a.arrayBuffer();case 5:e.t1=e.sent,r=e.t0.buf2hex.call(e.t0,e.t1),n.setChecksum(r),n.requestActivationBytes();case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.state={checksum:"",fileName:"input.aax"},n}return Object(p.a)(a,[{key:"buf2hex",value:function(e){return Array.prototype.map.call(new Uint8Array(e),(function(e){return("00"+e.toString(16)).slice(-2)})).join("")}},{key:"render",value:function(){var e=this,t=this.props.classes,a=this.state,n=a.checksum,r=a.activationBytes,i=a.fileName,c=a.file;return Object(D.jsxs)(w.a,{component:"main",maxWidth:"md",children:[Object(D.jsx)(v.a,{}),Object(D.jsxs)("div",{className:t.paper,children:[Object(D.jsx)(j.a,{className:t.avatar,children:Object(D.jsx)(k.a,{})}),Object(D.jsx)(C.a,{component:"h1",variant:"h5",children:"AAX Checksum Resolver"}),Object(D.jsxs)("form",{className:t.form,noValidate:!0,children:[Object(D.jsx)(_.a,{noClick:!0,onDrop:function(t){console.log(t),e.acceptFiles(t)},children:function(t){var a=t.getRootProps,r=t.getInputProps;return Object(D.jsx)("section",{children:Object(D.jsxs)("div",Object(o.a)(Object(o.a)({},a()),{},{children:[Object(D.jsx)("input",Object(o.a)({},r())),Object(D.jsx)(x.a,{error:e.isInputInvalid(),variant:"outlined",margin:"normal",required:!0,fullWidth:!0,id:"checksum",label:"Checksum or Drag&Drop .aax file -",name:"checksum",autoComplete:"checksum",autoFocus:!0,onChange:function(t){return e.setChecksum(t.target.value)},value:n,InputProps:{readOnly:!1,endAdornment:Object(D.jsx)(U,{extensions:["aax","AAX"],maxSize:99999,onChange:e.acceptFile,children:Object(D.jsx)(S.a,{children:Object(D.jsx)(I.a,{})})})}})]}))})}}),Object(D.jsx)(b.a,{fullWidth:!0,variant:"contained",onClick:function(){e.requestActivationBytes()},disabled:!this.isChecksumValid(),children:"Request Activation Bytes"}),Object(D.jsx)(this.DarkerDisabledTextField,{value:r,disabled:!0,variant:"outlined",margin:"normal",fullWidth:!0,id:"activationBytes",label:r?"":"Activation Bytes",name:"activationBytes",autoComplete:"activationBytes","aria-readonly":!0,InputProps:{readOnly:!0,endAdornment:Object(D.jsx)(z.CopyToClipboard,{text:r,children:Object(D.jsx)(S.a,{children:Object(D.jsx)(F.a,{})})})}})]})]}),Object(D.jsx)(re,{fileName:i,activationBytes:r,file:c}),Object(D.jsx)(O.a,{mt:1,children:Object(D.jsx)(this.Copyright,{})})]})}}]),a}(r.a.Component),le=Object(f.a)((function(e){return{paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%",marginTop:e.spacing(1)},heading:{fontSize:e.typography.pxToRem(15),flexBasis:"33.33%",flexShrink:0},secondaryHeading:{fontSize:e.typography.pxToRem(15),color:e.palette.text.secondary}}}))(se),ue=a(96),de=a.n(ue),pe=a(76);pe.a.initialize("UA-174657678-1"),pe.a.pageview(window.location.pathname+window.location.search),c.a.render(Object(D.jsxs)("div",{children:[Object(D.jsx)("div",{style:{display:"flex"},children:Object(D.jsx)(ce.a,{})}),Object(D.jsx)(de.a,{repo:"https://github.com/audible-tools/audible-tools.github.io",colorOctocat:"black",isPride:!0}),Object(D.jsx)(le,{})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[159,1,2]]]); -//# sourceMappingURL=main.3c25dbdb.chunk.js.map \ No newline at end of file diff --git a/static/js/main.3c25dbdb.chunk.js.map b/static/js/main.3c25dbdb.chunk.js.map deleted file mode 100644 index 1d907b7..0000000 --- a/static/js/main.3c25dbdb.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["serviceWorker.js","Components/FileInput/index.js","Components/FilePicker/index.js","OutputFormatSelection.js","OSSelector.js","OnlineConverter.jsx","ControlledAccordions.js","Utils/AaxHashAlgorithm.js","ChecksumResolver.js","index.js"],"names":["Boolean","window","location","hostname","match","FileInput","props","_handleUpload","bind","evt","file","target","files","this","onChange","fileInput","value","style","accept","type","display","ref","ele","React","cloneElement","children","onClick","click","Component","FilePicker","_validate","onError","maxSize","extensions","uploadedFileExt","name","split","pop","toLowerCase","map","ext","includes","join","maxBytes","size","defaultProps","OutputFormatSelection","outputFormat","setOutputFormat","FormControl","component","FormLabel","RadioGroup","aria-label","event","FormControlLabel","control","Radio","label","OSSelector","operatingSystem","setOperatingSystem","downloadFile","data","outputFileName","a","document","createElement","body","appendChild","blob","Blob","buffer","url","URL","createObjectURL","href","download","revokeObjectURL","getCommandAsList","activationBytes","codec","format","filter","x","doTranscode","setMessage","ffmpeg","createFFmpeg","log","progress","ratio","toFixed","command","load","fetchFile","FS","run","OnlineConverter","useState","message","downloadDisabled","Button","fileNameWithoutExtension","slice","variant","color","disabled","Typography","ControlledAccordions","DarkerDisabledTextField","withStyles","root","marginRight","TextField","setExpanded","setState","expanded","handleChange","panel","isExpanded","getCommand","state","fileName","osMap","os","cmd","discriminator","bin","di","classes","className","Accordion","AccordionSummary","expandIcon","aria-controls","id","heading","secondaryHeading","AccordionDetails","paddingLeft","multiline","margin","fullWidth","autoComplete","aria-readonly","fontSize","InputProps","readOnly","endAdornment","text","IconButton","theme","width","typography","pxToRem","flexBasis","flexShrink","palette","secondary","AaxHashAlgorithm","__fixed_key","hex","bytes","c","length","push","parseInt","substr","i","current","toString","source","Uint8Array","crypto","subtle","digest","Array","from","__hexToBytes","__HashData","concat","intermediate_key","intermediate_iv","checksum","__bytesToHex","Instance","CalculateChecksum","ChecksumResolver","Copyright","align","Link","Date","getFullYear","setChecksum","isChecksumValid","RegExp","test","isInputInvalid","addNotification","success","store","insert","container","animationIn","animationOut","dismiss","duration","onScreen","requestActivationBytes","fetch","request","json","result","acceptFiles","acceptFile","slic","arrayBuffer","results","buf2hex","prototype","call","Container","maxWidth","CssBaseline","paper","Avatar","avatar","form","noValidate","noClick","onDrop","acceptedFiles","console","getRootProps","getInputProps","error","required","autoFocus","Box","mt","marginTop","spacing","flexDirection","alignItems","backgroundColor","main","ReactGA","initialize","pageview","pathname","search","ReactDOM","render","repo","colorOctocat","isPride","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch"],"mappings":"iMAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2D,uOC0BSC,E,kDAvCb,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IAEDC,cAAgB,EAAKA,cAAcC,KAAnB,gBAHJ,E,iDAMnB,SAAcC,GACZ,IAAMC,EAAOD,EAAIE,OAAOC,MAAM,GAC9BC,KAAKP,MAAMQ,SAASJ,GAGpBG,KAAKE,UAAUC,MAAQ,O,oBAGzB,WAAU,IAAD,OACP,OACE,sBAAKC,MAAOJ,KAAKP,MAAMW,MAAvB,UACE,uBACEC,OAAQL,KAAKP,MAAMY,OACnBC,KAAK,OACLF,MAAO,CAAEG,QAAS,QAClBN,SAAUD,KAAKN,cACfc,IAAK,SAAAC,GAAG,OAAK,EAAKP,UAAYO,KAE/BC,IAAMC,aAAaX,KAAKP,MAAMmB,SAAU,CACvCC,QAAS,kBAAM,EAAKX,UAAUY,kB,GA1BhBJ,IAAMK,WCExBC,E,kDACJ,WAAYvB,GAAQ,IAAD,8BACjB,cAAMA,IAEDwB,UAAY,EAAKA,UAAUtB,KAAf,gBAHA,E,6CAMnB,SAAUE,GAAO,IAAD,EACqCG,KA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main.3c25dbdb.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","// external imports\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nclass FileInput extends React.Component {\n constructor(props) {\n super(props)\n\n this._handleUpload = this._handleUpload.bind(this)\n }\n\n _handleUpload(evt) {\n const file = evt.target.files[0]\n this.props.onChange(file)\n\n // free up the fileInput again\n this.fileInput.value = null\n }\n\n render() {\n return (\n
\n (this.fileInput = ele)}\n />\n {React.cloneElement(this.props.children, {\n onClick: () => this.fileInput.click()\n })}\n
\n )\n }\n}\n\nFileInput.propTypes = {\n style: PropTypes.object,\n accept: PropTypes.string,\n children: PropTypes.node.isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nexport default FileInput\n","// external imports\nimport React from 'react'\nimport PropTypes from 'prop-types'\n// local imports\nimport FileInput from '../FileInput'\n\nclass FilePicker extends React.Component {\n constructor(props) {\n super(props)\n\n this._validate = this._validate.bind(this)\n }\n\n _validate(file) {\n const { onError, onChange, maxSize, extensions } = this.props\n\n // make sure a file was provided in the first place\n if (!file) {\n onError('Failed to upload a file.')\n return\n }\n\n // if we care about file extensions\n if (extensions) {\n const uploadedFileExt = file.name\n .split('.')\n .pop()\n .toLowerCase()\n const isValidFileExt = extensions\n .map(ext => ext.toLowerCase())\n .includes(uploadedFileExt)\n\n if (!isValidFileExt) {\n onError(`Must upload a file of type: ${extensions.join(' or ')}`)\n return\n }\n }\n\n // convert maxSize from megabytes to bytes\n const maxBytes = maxSize * 1000000\n\n if (file.size > maxBytes) {\n onError(`File size must be less than ${maxSize} MB.`)\n return\n }\n\n // return native file object\n onChange(file)\n }\n\n render() {\n const { children, style } = this.props;\n const accept = this.props.extensions.map(ext => `.${ext}`).join(',')\n\n return (\n \n {children}\n \n )\n }\n}\n\nFilePicker.propTypes = {\n children: PropTypes.node.isRequired,\n onChange: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n // max file size in MB\n maxSize: PropTypes.number,\n // file extension\n extensions: PropTypes.array,\n // validate file contents\n validateContent: PropTypes.func,\n style: PropTypes.object\n}\n\nFilePicker.defaultProps = {\n maxSize: 2\n}\n\nexport default FilePicker\n","import React from 'react';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormLabel from '@material-ui/core/FormLabel';\n\n\n\nexport default function OutputFormatSelection(props) {\n\n const { outputFormat, setOutputFormat, style } = props;\n \n const handleChange = (event) => {\n \n setOutputFormat(event.target.value);\n };\n\n return (\n \n Output Format\n \n } label=\"AAC m4b\" />\n } label=\"FLAC hq\" />\n } label=\"Lame mp3\" />\n \n \n );\n}\n","import React from 'react';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormLabel from '@material-ui/core/FormLabel';\n\n\n\nexport default function OSSelector(props) {\n\n const { operatingSystem, setOperatingSystem, style } = props;\n\n const handleChange = (event) => setOperatingSystem(event.target.value);\n\n return (\n \n Operating System\n \n } label=\"Windows\" />\n } label=\"Linux\" />\n } label=\"Mac\" />\n \n \n );\n}\n","import React, {useState} from \"react\";\nimport Button from '@material-ui/core/Button';\nimport { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';\nimport Typography from \"@material-ui/core/Typography\";\n\nconst downloadFile= (data, outputFileName, outputFormat) => {\n let a = document.createElement(\"a\");\n document.body.appendChild(a);\n const blob = new Blob([data.buffer], { type: 'audio/'+outputFormat});\n const url = window.URL.createObjectURL(blob);\n a.href = url;\n a.download = outputFileName;\n a.click();\n window.URL.revokeObjectURL(url);\n}\nconst getCommandAsList = (file, outputFileName, outputFormat, activationBytes) =>{\n const outputFormatCodecMaps = [\n { format: \"m4b\", codec: \"copy\" },\n { format: \"flac\", codec: \"flac\" },\n { format: \"mp3\", codec: \"libmp3lame\" },\n ];\n const codec = outputFormatCodecMaps.filter(x => x.format === outputFormat)[0].codec;\n const filename = file.name;\n return [`-y`,\n '-activation_bytes', activationBytes,\n '-i', filename,\n '-c:a', codec,\n '-vn', outputFileName\n ];\n}\nconst doTranscode = async (file, outputFileName, outputFormat, activationBytes, setMessage) => {\n const ffmpeg = createFFmpeg({\n log: true,\n progress: ({ ratio }) => {\n setMessage(`Complete: ${(ratio * 100.0).toFixed(2)}%`);\n }\n });\n const command = getCommandAsList(file, outputFileName, outputFormat, activationBytes);\n setMessage('Loading ffmpeg-core.js');\n await ffmpeg.load();\n setMessage('Start transcoding');\n ffmpeg.FS('writeFile', file.name, await fetchFile(file));\n await ffmpeg.run(...command);\n setMessage('Complete transcoding');\n const data = ffmpeg.FS('readFile', outputFileName);\n downloadFile(data,outputFileName, outputFormat)\n};\nconst OnlineConverter = (props) => {\n const {file, activationBytes, outputFormat} = props\n const [message, setMessage] = useState('Click Start to transcode');\n\n const downloadDisabled = !(file && activationBytes && outputFormat)\n\n return(\n
\n \n {message}\n
\n )\n}\n\nexport default OnlineConverter","import React from 'react';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\n\nimport { Accordion, AccordionDetails, AccordionSummary } from '@material-ui/core';\n\nimport Typography from '@material-ui/core/Typography';\nimport TextField from '@material-ui/core/TextField';\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport FileCopyOutlined from '@material-ui/icons/FileCopyOutlined';\n\n// import {ExpandMoreIcon, FileCopyOutlined} from '@material-ui/icons';\n\nimport OutputFormatSelection from './OutputFormatSelection'\nimport OSSelector from './OSSelector'\n\n\nimport { Radio, RadioGroup } from '@material-ui/core';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormLabel from '@material-ui/core/FormLabel';\nimport OnlineConverter from \"./OnlineConverter\";\n\nclass ControlledAccordions extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n expanded: \"\",\n outputFormat: \"m4b\",\n operatingSystem: \"win\"\n };\n }\n DarkerDisabledTextField = withStyles({\n root: {\n marginRight: 8,\n \"& .MuiInputBase-root.Mui-disabled\": {\n color: \"rgba(0, 0, 0, 0.6)\"\n }\n }\n })(TextField);\n\n setExpanded = x => this.setState({ expanded: x })\n handleChange = (panel) => (event, isExpanded) => {\n this.setExpanded(isExpanded ? panel : false);\n };\n\n getCommand = () => {\n const { outputFormat, operatingSystem } = this.state;\n let { fileName, activationBytes } = this.props;\n\n activationBytes = activationBytes ?? \"00000000\";\n\n // ffmpeg.exe -y -activation_bytes 9f786605 -i '.\\INFINITUM - Die Ewigkeit der Sterne.AAX' -ss 5 -to 20 -c copy out-t01.m4a\n // faster:\n // ffmpeg.exe -y -activation_bytes 9f786605 -i '.\\INFINITUM - Die Ewigkeit der Sterne.AAX' -map_metadata 0 -id3v2_version 3 -ss 5 -to 20 -vn out-t02.m4a\n // ffmpeg.exe -y -activation_bytes 9f786605 -i '.\\INFINITUM - Die Ewigkeit der Sterne.AAX' -map_metadata 0 -ss 5 -to 20 -vn out-t02.m4a\n\n // -vn: As an output option, disables video recording i.e. automatic selection or mapping of any video stream. For full manual control see the -map option.\n // \" works on ps and cmd as discriminator\n\n const outputFormatCodecMaps = [\n { format: \"m4b\", codec: \"copy\" },\n { format: \"flac\", codec: \"flac\" },\n { format: \"mp3\", codec: \"libmp3lame\" },\n ];\n\n const osToBinMaps = [\n { os: \"win\", cmd: \"ffmpeg.exe\", discriminator: '\"' },\n { os: \"linux\", cmd: \"./ffmpeg\", discriminator: '\\'' },\n { os: \"osx\", cmd: \"./ffmpeg\", discriminator: '\\'' },\n ];\n\n let fileNameWithoutExtension = fileName.split('.').slice(0, -1).join('.');\n fileNameWithoutExtension = fileNameWithoutExtension == 'input' ? 'output' : fileNameWithoutExtension;\n\n const osMap = osToBinMaps.filter(x => x.os == operatingSystem)[0];\n\n const codec = outputFormatCodecMaps.filter(x => x.format == outputFormat)[0].codec;\n const bin = osMap.cmd;\n const di = osMap.discriminator;\n \n return `${bin} -y`\n + ` -activation_bytes ${activationBytes} -i ${di}.\\\\${fileName}${di}`\n + ` -map_metadata 0`\n + ` -id3v2_version 3`\n + ` -codec:a ${codec}`\n + ` -vn ${di}${fileNameWithoutExtension}.${outputFormat}${di}`;\n }\n\n render() {\n const { classes, file, activationBytes} = this.props;\n const { expanded, outputFormat, operatingSystem } = this.state;\n return (\n
\n \n }\n aria-controls=\"panel2bh-content\"\n id=\"panel2bh-header\"\n >\n Command and Convert\n \n Generate ffmpeg command or convert in browser\n \n \n \n this.setState({ outputFormat: x })}\n />\n\n this.setState({ operatingSystem: x })}\n style={{ paddingLeft: '20px' }}\n />\n\n \n \n \n \n \n )\n }}\n\n />\n \n \n \n
\n );\n }\n}\n\nconst useStyles = theme => ({\n root: {\n width: '100%',\n\n },\n heading: {\n fontSize: theme.typography.pxToRem(15),\n flexBasis: '33.33%',\n flexShrink: 0,\n },\n secondaryHeading: {\n fontSize: theme.typography.pxToRem(15),\n color: theme.palette.text.secondary,\n },\n\n});\n\nexport default withStyles(useStyles)(ControlledAccordions);\n","export default class AaxHashAlgorithm {\n static Instance = new AaxHashAlgorithm();\n \n __fixed_key = [0x77, 0x21, 0x4d, 0x4b, 0x19, 0x6a, 0x87, 0xcd, 0x52, 0x00, 0x45, 0xfd, 0x20, 0xa5, 0x1d, 0x67];\n \n \n // Convert a hex string to a byte array\n __hexToBytes(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n \n return bytes;\n }\n \n // Convert a byte array to a hex string\n __bytesToHex(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n var current = bytes[i] < 0 ? bytes[i] + 256 : bytes[i];\n hex.push((current >>> 4).toString(16));\n hex.push((current & 0xF).toString(16));\n }\n return hex.join(\"\");\n }\n \n async __HashData(data) {\n let source = new Uint8Array(data);\n let buffer = await crypto.subtle.digest('SHA-1', source);\n return Array.from(new Uint8Array(buffer));\n }\n \n async CalculateChecksum(activationBytes) {\n let data = this.__hexToBytes(activationBytes);\n \n let intermediate_key = await this.__HashData(this.__fixed_key.concat(data));\n let intermediate_iv = await this.__HashData(this.__fixed_key.concat(intermediate_key).concat(data));\n let checksum = await this.__HashData(intermediate_key.slice(0, 16).concat(intermediate_iv.slice(0, 16)));\n \n return this.__bytesToHex(checksum);\n }\n \n static async CalculateChecksum(activationBytes){\n return AaxHashAlgorithm.Instance.CalculateChecksum(activationBytes);\n }\n}","import React, { useState } from 'react';\nimport { withStyles } from \"@material-ui/core/styles\";\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\n\nimport Link from '@material-ui/core/Link';\nimport Box from '@material-ui/core/Box';\nimport LockOutlinedIcon from '@material-ui/icons/LockOutlined';\nimport Typography from '@material-ui/core/Typography';\nimport Container from '@material-ui/core/Container';\n\nimport Dropzone from 'react-dropzone'\nimport IconButton from '@material-ui/core/IconButton';\nimport FileCopyOutlined from '@material-ui/icons/FileCopyOutlined';\nimport PublishOutlined from '@material-ui/icons/PublishOutlined';\n\n// import { useFilePicker } from 'react-sage'\n// import { FilePicker } from 'react-file-picker'\n\nimport { FilePicker } from '../src/Components'\n\n\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\n\nimport ControlledAccordions from './ControlledAccordions'\nimport OnlineConverter from \"./OnlineConverter\";\nimport 'react-notifications-component/dist/theme.css'\n\nimport ReactNotification from 'react-notifications-component'\nimport { store } from 'react-notifications-component';\n// import 'animate.css/animate.compat.css'\n\nimport AaxHashAlgorithm from './Utils/AaxHashAlgorithm'\n\n\nconst useStyles = theme => ({\n paper: {\n marginTop: theme.spacing(8),\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n avatar: {\n margin: theme.spacing(1),\n backgroundColor: theme.palette.secondary.main,\n },\n form: {\n width: '100%', // Fix IE 11 issue.\n marginTop: theme.spacing(1),\n },\n\n //Accordeon\n heading: {\n fontSize: theme.typography.pxToRem(15),\n flexBasis: '33.33%',\n flexShrink: 0,\n },\n secondaryHeading: {\n fontSize: theme.typography.pxToRem(15),\n color: theme.palette.text.secondary,\n },\n});\n\nclass ChecksumResolver extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n checksum: \"\",\n fileName: \"input.aax\"\n }\n }\n\n DarkerDisabledTextField = withStyles({\n root: {\n marginRight: 8,\n \"& .MuiInputBase-root.Mui-disabled\": {\n color: \"rgba(0, 0, 0, 0.6)\"\n }\n }\n })(TextField);\n\n Copyright = (function () {\n return (\n \n {'Copyright © '}\n \n audible-tools\n {' '}\n {new Date().getFullYear()}\n {'.'}\n \n );\n })\n\n setChecksum = (value) => {\n if (value.length > 40) {\n return;\n }\n this.setState({ checksum: value })\n }\n\n isChecksumValid = () => {\n const { checksum } = this.state;\n const regex = RegExp('[a-f0-9]{40}');\n const testResults = regex.test(checksum);\n\n return testResults;\n }\n\n isInputInvalid = () => {\n const { checksum } = this.state;\n if (!checksum || checksum === '') {\n return false;\n }\n return !this.isChecksumValid();\n };\n\n addNotification = function (text, success = true) {\n store.addNotification({\n message: text,\n type: success ? \"success\" : \"danger\",\n // type: \"danger\",\n insert: \"bottom-left\",\n container: \"top-full\",\n animationIn: [\"animate__animated\", \"animate__fadeIn\"],\n animationOut: [\"animate__animated\", \"animate__fadeOut\"],\n dismiss: {\n duration: 3000,\n onScreen: false\n }\n });\n }\n\n requestActivationBytes = async () => {\n const { checksum } = this.state;\n try {\n let request = await fetch(\"https://aax.api.j-kit.me/api/v2/activation/\" + checksum);\n let result = await request.json();\n const { success, activationBytes } = result;\n\n if (success !== true) {\n this.setState({ activationBytes: 'UNKNOWN' });\n this.addNotification(\"An error occured while resolving the activation bytes, please check your inputs\", false);\n return;\n }\n\n if (success === true) {\n const calculatedChecksum = await AaxHashAlgorithm.CalculateChecksum(activationBytes);\n if (calculatedChecksum == checksum) {\n this.setState({ activationBytes: activationBytes });\n this.addNotification(\"Successfully resolved the activation bytes\");\n return;\n }\n \n this.setState({ activationBytes: \"API ERROR\" });\n this.addNotification(\"An unexpected error occured while resolving the activation bytes, please try again\", false);\n\n }\n } catch (error) {\n this.setState({ activationBytes: error });\n this.addNotification(\"An error occured while resolving the activation bytes, please check your inputs\", false);\n }\n }\n\n buf2hex(buffer) { // buffer is an ArrayBuffer\n return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join('');\n }\n\n acceptFiles = async files => {\n const file = files[0];\n await this.acceptFile(file);\n }\n\n acceptFile = async file => {\n // if (!file.name.toLowerCase().endsWith(\".aax\")) {\n // alert('FileType not supported!');\n // return;\n // }\n\n this.setState({ fileName: file.name, file:file });\n const slic = file.slice(653, 653 + 20);\n const results = this.buf2hex(await slic.arrayBuffer());\n this.setChecksum(results)\n this.requestActivationBytes();\n\n }\n\n render() {\n const { classes } = this.props;\n const { checksum, activationBytes, fileName, file } = this.state;\n\n // const { files, onClick, errors, HiddenFileInput } = useFilePicker({\n // maxFileSize: 1000000,\n // maxImageWidth: 1000,\n // imageQuality: 0.92,\n // resizeImage: true\n // });\n\n return (\n \n\n \n
\n \n \n \n \n AAX Checksum Resolver\n \n\n
\n {\n console.log(acceptedFiles);\n this.acceptFiles(acceptedFiles);\n }}>\n {({ getRootProps, getInputProps }) => (\n
\n
\n \n this.setChecksum(x.target.value)}\n value={checksum}\n InputProps={{\n readOnly: false,\n endAdornment: (\n \n \n \n \n \n )\n }}\n\n />\n
\n
\n )}\n \n\n {\n this.requestActivationBytes();\n }}\n disabled={!this.isChecksumValid()}\n >\n Request Activation Bytes\n \n\n \n \n \n \n \n )\n }}\n\n />\n\n \n
\n \n \n \n \n\n\n\n
\n );\n }\n}\n\nexport default withStyles(useStyles)(ChecksumResolver);\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport * as serviceWorker from './serviceWorker';\nimport ChecksumResolver from './ChecksumResolver';\nimport ReactNotification from 'react-notifications-component'\nimport ForkMeOnGithub from 'fork-me-on-github';\n\n\nimport ReactGA from 'react-ga';\nReactGA.initialize('UA-174657678-1');\nReactGA.pageview(window.location.pathname + window.location.search);\n\nReactDOM.render(\n
\n
\n \n\n
\n \n \n
,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.c4bf3b9b.chunk.js b/static/js/main.c4bf3b9b.chunk.js new file mode 100644 index 0000000..b8069db --- /dev/null +++ b/static/js/main.c4bf3b9b.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpmaterial-pg-01"]=this["webpackJsonpmaterial-pg-01"]||[]).push([[0],{119:function(e,t,a){},159:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(10),c=a.n(i);a(119),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var o=a(70),s=a(11),l=a.n(s),u=a(25),d=a(21),p=a(22),h=a(31),m=a(30),f=a(6),j=a(206),b=a(194),v=a(200),x=a(201),y=a(198),O=a(203),g=a(94),k=a.n(g),C=a(101),w=a(199),_=a(97),S=a(161),B=a(69),F=a.n(B),A=a(95),I=a.n(A),N=a(40),D=a(5),R=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e))._handleUpload=n._handleUpload.bind(Object(N.a)(n)),n}return Object(p.a)(a,[{key:"_handleUpload",value:function(e){var t=e.target.files[0];this.props.onChange(t),this.fileInput.value=null}},{key:"render",value:function(){var e=this;return Object(D.jsxs)("div",{style:this.props.style,children:[Object(D.jsx)("input",{accept:this.props.accept,type:"file",style:{display:"none"},onChange:this._handleUpload,ref:function(t){return e.fileInput=t}}),r.a.cloneElement(this.props.children,{onClick:function(){return e.fileInput.click()}})]})}}]),a}(r.a.Component),T=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e))._validate=n._validate.bind(Object(N.a)(n)),n}return Object(p.a)(a,[{key:"_validate",value:function(e){var t=this.props,a=t.onError,n=t.onChange,r=t.maxSize,i=t.extensions;if(e){if(i){var c=e.name.split(".").pop().toLowerCase();if(!i.map((function(e){return e.toLowerCase()})).includes(c))return void a("Must upload a file of type: ".concat(i.join(" or ")))}var o=1e6*r;e.size>o?a("File size must be less than ".concat(r," MB.")):n(e)}else a("Failed to upload a file.")}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.style,n=this.props.extensions.map((function(e){return".".concat(e)})).join(",");return Object(D.jsx)(R,{onChange:this._validate,style:a,accept:n,children:t})}}]),a}(r.a.Component);T.defaultProps={maxSize:2};var U=T,z=a(58),L=a(205),H=a(196),W=a(197),E=a(93),P=a.n(E),M=a(204),q=a(208),V=a(193),J=a(189),X=a(192);function G(e){var t=e.outputFormat,a=e.setOutputFormat,n=e.style;return Object(D.jsxs)(J.a,{component:"fieldset",style:n,children:[Object(D.jsx)(X.a,{component:"legend",children:"Output Format"}),Object(D.jsxs)(q.a,{"aria-label":"format",name:"format",value:t,onChange:function(e){a(e.target.value)},children:[Object(D.jsx)(V.a,{value:"m4b",control:Object(D.jsx)(M.a,{}),label:"AAC m4b"}),Object(D.jsx)(V.a,{value:"flac",control:Object(D.jsx)(M.a,{}),label:"FLAC hq"}),Object(D.jsx)(V.a,{value:"mp3",control:Object(D.jsx)(M.a,{}),label:"Lame mp3"})]})]})}function K(e){var t=e.operatingSystem,a=e.setOperatingSystem,n=e.style;return Object(D.jsxs)(J.a,{component:"fieldset",style:n,children:[Object(D.jsx)(X.a,{component:"legend",children:"Operating System"}),Object(D.jsxs)(q.a,{"aria-label":"format",name:"format",value:t,onChange:function(e){return a(e.target.value)},children:[Object(D.jsx)(V.a,{value:"win",control:Object(D.jsx)(M.a,{}),label:"Windows"}),Object(D.jsx)(V.a,{value:"linux",control:Object(D.jsx)(M.a,{}),label:"Linux"}),Object(D.jsx)(V.a,{value:"osx",control:Object(D.jsx)(M.a,{}),label:"Mac"})]})]})}var Y=a(98),$=a(99),Q=a(75),Z=function(e,t,a){var n=document.createElement("a");document.body.appendChild(n);var r=new Blob([e.buffer],{type:"audio/"+a}),i=window.URL.createObjectURL(r);n.href=i,n.download=t,n.click(),window.URL.revokeObjectURL(i)},ee=function(e,t,a,n){var r=[{format:"m4b",codec:"copy"},{format:"flac",codec:"flac"},{format:"mp3",codec:"libmp3lame"}].filter((function(e){return e.format===a}))[0].codec;return["-y","-activation_bytes",n,"-i",e.name,"-c:a",r,"-vn",t]},te=function(){var e=Object(u.a)(l.a.mark((function e(t,a,n,r,i){var c,o,s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=Object(Q.createFFmpeg)({log:!0,progress:function(e){var t=e.ratio;i("Complete: ".concat((100*t).toFixed(2),"%"))}}),o=ee(t,a,n,r),i("Loading ffmpeg-core.js"),e.next=5,c.load();case 5:return i("Start transcoding"),e.t0=c,e.t1=t.name,e.next=10,Object(Q.fetchFile)(t);case 10:return e.t2=e.sent,e.t0.FS.call(e.t0,"writeFile",e.t1,e.t2),e.next=14,c.run.apply(c,Object($.a)(o));case 14:i("Complete transcoding"),s=c.FS("readFile",a),Z(s,a,n);case 17:case"end":return e.stop()}}),e)})));return function(t,a,n,r,i){return e.apply(this,arguments)}}(),ae=function(e){var t=e.file,a=e.activationBytes,r=e.outputFormat,i=Object(n.useState)("Click Start to transcode"),c=Object(Y.a)(i,2),o=c[0],s=c[1],l=!(t&&a&&r);return Object(D.jsxs)("div",{children:[Object(D.jsx)(b.a,{onClick:function(){var e=t.name.split(".").slice(0,-1).join("."),n="".concat(e="input"===e?"output":e,".").concat(r);return te(t,n,r,a,s)},variant:"contained",color:"primary",disabled:l,fullWidth:!0,children:"Convert in Browser"}),Object(D.jsx)(C.a,{children:o})]})},ne=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e)).DarkerDisabledTextField=Object(f.a)({root:{marginRight:8,"& .MuiInputBase-root.Mui-disabled":{color:"rgba(0, 0, 0, 0.6)"}}})(x.a),n.setExpanded=function(e){return n.setState({expanded:e})},n.handleChange=function(e){return function(t,a){n.setExpanded(!!a&&e)}},n.getCommand=function(){var e,t=n.state,a=t.outputFormat,r=t.operatingSystem,i=n.props,c=i.fileName,o=i.activationBytes;o=null!==(e=o)&&void 0!==e?e:"00000000";var s=c.split(".").slice(0,-1).join(".");s="input"==s?"output":s;var l=[{os:"win",cmd:"ffmpeg.exe",discriminator:'"'},{os:"linux",cmd:"./ffmpeg",discriminator:"'"},{os:"osx",cmd:"./ffmpeg",discriminator:"'"}].filter((function(e){return e.os==r}))[0],u=[{format:"m4b",codec:"copy"},{format:"flac",codec:"flac"},{format:"mp3",codec:"libmp3lame"}].filter((function(e){return e.format==a}))[0].codec,d=l.cmd,p=l.discriminator;return"".concat(d," -y")+" -activation_bytes ".concat(o," -i ").concat(p,".\\").concat(c).concat(p)+" -map_metadata 0 -id3v2_version 3"+" -codec:a ".concat(u)+" -vn ".concat(p).concat(s,".").concat(a).concat(p)},n.state={expanded:"",outputFormat:"m4b",operatingSystem:"win"},n}return Object(p.a)(a,[{key:"render",value:function(){var e=this,t=this.props,a=t.classes,n=t.file,r=t.activationBytes,i=this.state,c=i.expanded,o=i.outputFormat,s=i.operatingSystem;return Object(D.jsx)("div",{className:a.root,children:Object(D.jsxs)(L.a,{expanded:"panel2"===c,onChange:this.handleChange("panel2"),children:[Object(D.jsxs)(H.a,{expandIcon:Object(D.jsx)(P.a,{}),"aria-controls":"panel2bh-content",id:"panel2bh-header",children:[Object(D.jsx)(C.a,{className:a.heading,children:"Command and Convert"}),Object(D.jsx)(C.a,{className:a.secondaryHeading,children:"Generate ffmpeg command or convert in browser"})]}),Object(D.jsxs)(W.a,{style:{display:"block"},children:[Object(D.jsx)(G,{outputFormat:o,setOutputFormat:function(t){return e.setState({outputFormat:t})}}),Object(D.jsx)(K,{operatingSystem:s,setOperatingSystem:function(t){return e.setState({operatingSystem:t})},style:{paddingLeft:"20px"}}),Object(D.jsx)(this.DarkerDisabledTextField,{value:this.getCommand(),disabled:!0,multiline:!0,variant:"outlined",margin:"normal",fullWidth:!0,id:"activationBytes",label:"cmd",name:"activationBytes",autoComplete:"activationBytes","aria-readonly":!0,fontSize:5,InputProps:{readOnly:!0,endAdornment:Object(D.jsx)(z.CopyToClipboard,{text:this.getCommand(),children:Object(D.jsx)(S.a,{children:Object(D.jsx)(F.a,{})})})}}),Object(D.jsx)(ae,{file:n,activationBytes:r,outputFormat:o})]})]})})}}]),a}(r.a.Component),re=Object(f.a)((function(e){return{root:{width:"100%"},heading:{fontSize:e.typography.pxToRem(15),flexBasis:"33.33%",flexShrink:0},secondaryHeading:{fontSize:e.typography.pxToRem(15),color:e.palette.text.secondary}}}))(ne),ie=(a(147),a(47)),ce=a.n(ie),oe=function(){function e(){Object(d.a)(this,e),this.__fixed_key=[119,33,77,75,25,106,135,205,82,0,69,253,32,165,29,103]}return Object(p.a)(e,[{key:"__hexToBytes",value:function(e){for(var t=[],a=0;a>>4).toString(16)),t.push((15&n).toString(16))}return t.join("")}},{key:"__HashData",value:function(){var e=Object(u.a)(l.a.mark((function e(t){var a,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Uint8Array(t),e.next=3,crypto.subtle.digest("SHA-1",a);case 3:return n=e.sent,e.abrupt("return",Array.from(new Uint8Array(n)));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"CalculateChecksum",value:function(){var e=Object(u.a)(l.a.mark((function e(t){var a,n,r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.__hexToBytes(t),e.next=3,this.__HashData(this.__fixed_key.concat(a));case 3:return n=e.sent,e.next=6,this.__HashData(this.__fixed_key.concat(n).concat(a));case 6:return r=e.sent,e.next=9,this.__HashData(n.slice(0,16).concat(r.slice(0,16)));case 9:return i=e.sent,e.abrupt("return",this.__bytesToHex(i));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}],[{key:"CalculateChecksum",value:function(){var t=Object(u.a)(l.a.mark((function t(a){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.Instance.CalculateChecksum(a));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}();oe.Instance=new oe;var se=function(e){Object(h.a)(a,e);var t=Object(m.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e)).DarkerDisabledTextField=Object(f.a)({root:{marginRight:8,"& .MuiInputBase-root.Mui-disabled":{color:"rgba(0, 0, 0, 0.6)"}}})(x.a),n.Copyright=function(){return Object(D.jsxs)(C.a,{variant:"body2",color:"textSecondary",align:"center",children:["Copyright \xa9 ",Object(D.jsx)(y.a,{color:"inherit",href:"https://audible-tools.github.io/",children:"audible-tools"})," ",(new Date).getFullYear(),"."]})},n.setChecksum=function(e){e.length>40||n.setState({checksum:e})},n.isChecksumValid=function(){var e=n.state.checksum;return RegExp("[a-f0-9]{40}").test(e)},n.isInputInvalid=function(){var e=n.state.checksum;return!(!e||""===e)&&!n.isChecksumValid()},n.addNotification=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ie.store.addNotification({message:e,type:t?"success":"danger",insert:"bottom-left",container:"top-full",animationIn:["animate__animated","animate__fadeIn"],animationOut:["animate__animated","animate__fadeOut"],dismiss:{duration:3e3,onScreen:!1}})},n.requestActivationBytes=Object(u.a)(l.a.mark((function e(){var t,a,r,i,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.state.checksum,e.prev=1,e.next=4,fetch("https://aax.api.j-kit.me/api/v2/activation/"+t);case 4:return a=e.sent,e.next=7,a.json();case 7:if(r=e.sent,i=r.success,c=r.activationBytes,!0===i){e.next=13;break}return n.setState({activationBytes:"UNKNOWN"}),n.addNotification("An error occured while resolving the activation bytes, please check your inputs",!1),e.abrupt("return");case 13:if(!0!==i){e.next=23;break}return e.next=16,oe.CalculateChecksum(c);case 16:if(e.sent!=t){e.next=21;break}return n.setState({activationBytes:c}),n.addNotification("Successfully resolved the activation bytes"),e.abrupt("return");case 21:n.setState({activationBytes:"API ERROR"}),n.addNotification("An unexpected error occured while resolving the activation bytes, please try again",!1);case 23:e.next=29;break;case 25:e.prev=25,e.t0=e.catch(1),n.setState({activationBytes:e.t0}),n.addNotification("An error occured while resolving the activation bytes, please check your inputs",!1);case 29:case"end":return e.stop()}}),e,null,[[1,25]])}))),n.acceptFiles=function(){var e=Object(u.a)(l.a.mark((function e(t){var a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t[0],e.next=3,n.acceptFile(a);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.acceptFile=function(){var e=Object(u.a)(l.a.mark((function e(t){var a,r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({fileName:t.name,file:t}),a=t.slice(653,673),e.t0=n,e.next=5,a.arrayBuffer();case 5:e.t1=e.sent,r=e.t0.buf2hex.call(e.t0,e.t1),n.setChecksum(r),n.requestActivationBytes();case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.state={checksum:"",fileName:"input.aax"},n}return Object(p.a)(a,[{key:"buf2hex",value:function(e){return Array.prototype.map.call(new Uint8Array(e),(function(e){return("00"+e.toString(16)).slice(-2)})).join("")}},{key:"render",value:function(){var e=this,t=this.props.classes,a=this.state,n=a.checksum,r=a.activationBytes,i=a.fileName,c=a.file;return Object(D.jsxs)(w.a,{component:"main",maxWidth:"md",children:[Object(D.jsx)(v.a,{}),Object(D.jsxs)("div",{className:t.paper,children:[Object(D.jsx)(j.a,{className:t.avatar,children:Object(D.jsx)(k.a,{})}),Object(D.jsx)(C.a,{component:"h1",variant:"h5",children:"AAX Checksum Resolver"}),Object(D.jsxs)("form",{className:t.form,noValidate:!0,children:[Object(D.jsx)(_.a,{noClick:!0,onDrop:function(t){console.log(t),e.acceptFiles(t)},children:function(t){var a=t.getRootProps,r=t.getInputProps;return Object(D.jsx)("section",{children:Object(D.jsxs)("div",Object(o.a)(Object(o.a)({},a()),{},{children:[Object(D.jsx)("input",Object(o.a)({},r())),Object(D.jsx)(x.a,{error:e.isInputInvalid(),variant:"outlined",margin:"normal",required:!0,fullWidth:!0,id:"checksum",label:"Checksum or Drag&Drop .aax file -",name:"checksum",autoComplete:"checksum",autoFocus:!0,onChange:function(t){return e.setChecksum(t.target.value)},value:n,InputProps:{readOnly:!1,endAdornment:Object(D.jsx)(U,{extensions:["aax","AAX"],maxSize:99999,onChange:e.acceptFile,children:Object(D.jsx)(S.a,{children:Object(D.jsx)(I.a,{})})})}})]}))})}}),Object(D.jsx)(b.a,{fullWidth:!0,variant:"contained",onClick:function(){e.requestActivationBytes()},disabled:!this.isChecksumValid(),children:"Request Activation Bytes"}),Object(D.jsx)(this.DarkerDisabledTextField,{value:r,disabled:!0,variant:"outlined",margin:"normal",fullWidth:!0,id:"activationBytes",label:r?"":"Activation Bytes",name:"activationBytes",autoComplete:"activationBytes","aria-readonly":!0,InputProps:{readOnly:!0,endAdornment:Object(D.jsx)(z.CopyToClipboard,{text:r,children:Object(D.jsx)(S.a,{children:Object(D.jsx)(F.a,{})})})}})]})]}),Object(D.jsx)(re,{fileName:i,activationBytes:r,file:c}),Object(D.jsx)(O.a,{mt:1,children:Object(D.jsx)(this.Copyright,{})})]})}}]),a}(r.a.Component),le=Object(f.a)((function(e){return{paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%",marginTop:e.spacing(1)},heading:{fontSize:e.typography.pxToRem(15),flexBasis:"33.33%",flexShrink:0},secondaryHeading:{fontSize:e.typography.pxToRem(15),color:e.palette.text.secondary}}}))(se),ue=a(96),de=a.n(ue),pe=a(76);pe.a.initialize("UA-174657678-1"),pe.a.pageview(window.location.pathname+window.location.search),c.a.render(Object(D.jsxs)("div",{children:[Object(D.jsx)("div",{style:{display:"flex"},children:Object(D.jsx)(ce.a,{})}),Object(D.jsx)(de.a,{repo:"https://github.com/audible-tools/audible-tools.github.io",colorOctocat:"black",isPride:!0}),Object(D.jsx)(le,{})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[159,1,2]]]); +//# sourceMappingURL=main.c4bf3b9b.chunk.js.map \ No newline at end of file diff --git a/static/js/main.c4bf3b9b.chunk.js.map b/static/js/main.c4bf3b9b.chunk.js.map new file mode 100644 index 0000000..9ba4fdb --- /dev/null +++ b/static/js/main.c4bf3b9b.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["serviceWorker.js","Components/FileInput/index.js","Components/FilePicker/index.js","OutputFormatSelection.js","OSSelector.js","OnlineConverter.jsx","ControlledAccordions.js","Utils/AaxHashAlgorithm.js","ChecksumResolver.js","index.js"],"names":["Boolean","window","location","hostname","match","FileInput","props","_handleUpload","bind","evt","file","target","files","this","onChange","fileInput","value","style","accept","type","display","ref","ele","React","cloneElement","children","onClick","click","Component","FilePicker","_validate","onError","maxSize","extensions","uploadedFileExt","name","split","pop","toLowerCase","map","ext","includes","join","maxBytes","size","defaultProps","OutputFormatSelection","outputFormat","setOutputFormat","FormControl","component","FormLabel","RadioGroup","aria-label","event","FormControlLabel","control","Radio","label","OSSelector","operatingSystem","setOperatingSystem","downloadFile","data","outputFileName","a","document","createElement","body","appendChild","blob","Blob","buffer","url","URL","createObjectURL","href","download","revokeObjectURL","getCommandAsList","activationBytes","codec","format","filter","x","doTranscode","setMessage","ffmpeg","createFFmpeg","log","progress","ratio","toFixed","command","load","fetchFile","FS","run","OnlineConverter","useState","message","downloadDisabled","Button","fileNameWithoutExtension","slice","variant","color","disabled","fullWidth","Typography","ControlledAccordions","DarkerDisabledTextField","withStyles","root","marginRight","TextField","setExpanded","setState","expanded","handleChange","panel","isExpanded","getCommand","state","fileName","osMap","os","cmd","discriminator","bin","di","classes","className","Accordion","AccordionSummary","expandIcon","aria-controls","id","heading","secondaryHeading","AccordionDetails","paddingLeft","multiline","margin","autoComplete","aria-readonly","fontSize","InputProps","readOnly","endAdornment","text","IconButton","theme","width","typography","pxToRem","flexBasis","flexShrink","palette","secondary","AaxHashAlgorithm","__fixed_key","hex","bytes","c","length","push","parseInt","substr","i","current","toString","source","Uint8Array","crypto","subtle","digest","Array","from","__hexToBytes","__HashData","concat","intermediate_key","intermediate_iv","checksum","__bytesToHex","Instance","CalculateChecksum","ChecksumResolver","Copyright","align","Link","Date","getFullYear","setChecksum","isChecksumValid","RegExp","test","isInputInvalid","addNotification","success","store","insert","container","animationIn","animationOut","dismiss","duration","onScreen","requestActivationBytes","fetch","request","json","result","acceptFiles","acceptFile","slic","arrayBuffer","results","buf2hex","prototype","call","Container","maxWidth","CssBaseline","paper","Avatar","avatar","form","noValidate","noClick","onDrop","acceptedFiles","console","getRootProps","getInputProps","error","required","autoFocus","Box","mt","marginTop","spacing","flexDirection","alignItems","backgroundColor","main","ReactGA","initialize","pageview","pathname","search","ReactDOM","render","repo","colorOctocat","isPride","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch"],"mappings":"iMAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2D,uOC0BSC,E,kDAvCb,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IAEDC,cAAgB,EAAKA,cAAcC,KAAnB,gBAHJ,E,iDAMnB,SAAcC,GACZ,IAAMC,EAAOD,EAAIE,OAAOC,MAAM,GAC9BC,KAAKP,MAAMQ,SAASJ,GAGpBG,KAAKE,UAAUC,MAAQ,O,oBAGzB,WAAU,IAAD,OACP,OACE,sBAAKC,MAAOJ,KAAKP,MAAMW,MAAvB,UACE,uBACEC,OAAQL,KAAKP,MAAMY,OACnBC,KAAK,OACLF,MAAO,CAAEG,QAAS,QAClBN,SAAUD,KAAKN,cACfc,IAAK,SAAAC,GAAG,OAAK,EAAKP,UAAYO,KAE/BC,IAAMC,aAAaX,KAAKP,MAAMmB,SAAU,CACvCC,QAAS,kBAAM,EAAKX,UAAUY,kB,GA1BhBJ,IAAMK,WCExBC,E,kDACJ,WAAYvB,GAAQ,IAAD,8BACj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AAcC,MACrBC,MAAK,SAAAC,GACJA,EAAaC,gBAEdC,OAAM,SAAA5B,GACLH,QAAQG,MAAMA,EAAMxI,c","file":"static/js/main.c4bf3b9b.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","// external imports\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nclass FileInput extends React.Component {\n constructor(props) {\n super(props)\n\n this._handleUpload = this._handleUpload.bind(this)\n }\n\n _handleUpload(evt) {\n const file = evt.target.files[0]\n this.props.onChange(file)\n\n // free up the fileInput again\n this.fileInput.value = null\n }\n\n render() {\n return (\n
\n (this.fileInput = ele)}\n />\n {React.cloneElement(this.props.children, {\n onClick: () => this.fileInput.click()\n })}\n
\n )\n }\n}\n\nFileInput.propTypes = {\n style: PropTypes.object,\n accept: PropTypes.string,\n children: PropTypes.node.isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nexport default FileInput\n","// external imports\nimport React from 'react'\nimport PropTypes from 'prop-types'\n// local imports\nimport FileInput from '../FileInput'\n\nclass FilePicker extends React.Component {\n constructor(props) {\n super(props)\n\n this._validate = this._validate.bind(this)\n }\n\n _validate(file) {\n const { onError, onChange, maxSize, extensions } = this.props\n\n // make sure a file was provided in the first place\n if (!file) {\n onError('Failed to upload a file.')\n return\n }\n\n // if we care about file extensions\n if (extensions) {\n const uploadedFileExt = file.name\n .split('.')\n .pop()\n .toLowerCase()\n const isValidFileExt = extensions\n .map(ext => ext.toLowerCase())\n .includes(uploadedFileExt)\n\n if (!isValidFileExt) {\n onError(`Must upload a file of type: ${extensions.join(' or ')}`)\n return\n }\n }\n\n // convert maxSize from megabytes to bytes\n const maxBytes = maxSize * 1000000\n\n if (file.size > maxBytes) {\n onError(`File size must be less than ${maxSize} MB.`)\n return\n }\n\n // return native file object\n onChange(file)\n }\n\n render() {\n const { children, style } = this.props;\n const accept = this.props.extensions.map(ext => `.${ext}`).join(',')\n\n return (\n \n {children}\n \n )\n }\n}\n\nFilePicker.propTypes = {\n children: PropTypes.node.isRequired,\n onChange: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n // max file size in MB\n maxSize: PropTypes.number,\n // file extension\n extensions: PropTypes.array,\n // validate file contents\n validateContent: PropTypes.func,\n style: PropTypes.object\n}\n\nFilePicker.defaultProps = {\n maxSize: 2\n}\n\nexport default FilePicker\n","import React from 'react';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormLabel from '@material-ui/core/FormLabel';\n\n\n\nexport default function OutputFormatSelection(props) {\n\n const { outputFormat, setOutputFormat, style } = props;\n \n const handleChange = (event) => {\n \n setOutputFormat(event.target.value);\n };\n\n return (\n \n Output Format\n \n } label=\"AAC m4b\" />\n } label=\"FLAC hq\" />\n } label=\"Lame mp3\" />\n \n \n );\n}\n","import React from 'react';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormLabel from '@material-ui/core/FormLabel';\n\n\n\nexport default function OSSelector(props) {\n\n const { operatingSystem, setOperatingSystem, style } = props;\n\n const handleChange = (event) => setOperatingSystem(event.target.value);\n\n return (\n \n Operating System\n \n } label=\"Windows\" />\n } label=\"Linux\" />\n } label=\"Mac\" />\n \n \n );\n}\n","import React, {useState} from \"react\";\nimport Button from '@material-ui/core/Button';\nimport { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';\nimport Typography from \"@material-ui/core/Typography\";\n\nconst downloadFile= (data, outputFileName, outputFormat) => {\n let a = document.createElement(\"a\");\n document.body.appendChild(a);\n const blob = new Blob([data.buffer], { type: 'audio/'+outputFormat});\n const url = window.URL.createObjectURL(blob);\n a.href = url;\n a.download = outputFileName;\n a.click();\n window.URL.revokeObjectURL(url);\n}\nconst getCommandAsList = (file, outputFileName, outputFormat, activationBytes) =>{\n const outputFormatCodecMaps = [\n { format: \"m4b\", codec: \"copy\" },\n { format: \"flac\", codec: \"flac\" },\n { format: \"mp3\", codec: \"libmp3lame\" },\n ];\n const codec = outputFormatCodecMaps.filter(x => x.format === outputFormat)[0].codec;\n const filename = file.name;\n return [`-y`,\n '-activation_bytes', activationBytes,\n '-i', filename,\n '-c:a', codec,\n '-vn', outputFileName\n ];\n}\nconst doTranscode = async (file, outputFileName, outputFormat, activationBytes, setMessage) => {\n const ffmpeg = createFFmpeg({\n log: true,\n progress: ({ ratio }) => {\n setMessage(`Complete: ${(ratio * 100.0).toFixed(2)}%`);\n }\n });\n const command = getCommandAsList(file, outputFileName, outputFormat, activationBytes);\n setMessage('Loading ffmpeg-core.js');\n await ffmpeg.load();\n setMessage('Start transcoding');\n ffmpeg.FS('writeFile', file.name, await fetchFile(file));\n await ffmpeg.run(...command);\n setMessage('Complete transcoding');\n const data = ffmpeg.FS('readFile', outputFileName);\n downloadFile(data,outputFileName, outputFormat)\n};\nconst OnlineConverter = (props) => {\n const {file, activationBytes, outputFormat} = props\n const [message, setMessage] = useState('Click Start to transcode');\n\n const downloadDisabled = !(file && activationBytes && outputFormat)\n\n return(\n
\n \n {message}\n
\n )\n}\n\nexport default OnlineConverter","import React from 'react';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\n\nimport { Accordion, AccordionDetails, AccordionSummary } from '@material-ui/core';\n\nimport Typography from '@material-ui/core/Typography';\nimport TextField from '@material-ui/core/TextField';\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport FileCopyOutlined from '@material-ui/icons/FileCopyOutlined';\n\n// import {ExpandMoreIcon, FileCopyOutlined} from '@material-ui/icons';\n\nimport OutputFormatSelection from './OutputFormatSelection'\nimport OSSelector from './OSSelector'\n\n\nimport { Radio, RadioGroup } from '@material-ui/core';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormLabel from '@material-ui/core/FormLabel';\nimport OnlineConverter from \"./OnlineConverter\";\n\nclass ControlledAccordions extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n expanded: \"\",\n outputFormat: \"m4b\",\n operatingSystem: \"win\"\n };\n }\n DarkerDisabledTextField = withStyles({\n root: {\n marginRight: 8,\n \"& .MuiInputBase-root.Mui-disabled\": {\n color: \"rgba(0, 0, 0, 0.6)\"\n }\n }\n })(TextField);\n\n setExpanded = x => this.setState({ expanded: x })\n handleChange = (panel) => (event, isExpanded) => {\n this.setExpanded(isExpanded ? panel : false);\n };\n\n getCommand = () => {\n const { outputFormat, operatingSystem } = this.state;\n let { fileName, activationBytes } = this.props;\n\n activationBytes = activationBytes ?? \"00000000\";\n\n // ffmpeg.exe -y -activation_bytes 9f786605 -i '.\\INFINITUM - Die Ewigkeit der Sterne.AAX' -ss 5 -to 20 -c copy out-t01.m4a\n // faster:\n // ffmpeg.exe -y -activation_bytes 9f786605 -i '.\\INFINITUM - Die Ewigkeit der Sterne.AAX' -map_metadata 0 -id3v2_version 3 -ss 5 -to 20 -vn out-t02.m4a\n // ffmpeg.exe -y -activation_bytes 9f786605 -i '.\\INFINITUM - Die Ewigkeit der Sterne.AAX' -map_metadata 0 -ss 5 -to 20 -vn out-t02.m4a\n\n // -vn: As an output option, disables video recording i.e. automatic selection or mapping of any video stream. For full manual control see the -map option.\n // \" works on ps and cmd as discriminator\n\n const outputFormatCodecMaps = [\n { format: \"m4b\", codec: \"copy\" },\n { format: \"flac\", codec: \"flac\" },\n { format: \"mp3\", codec: \"libmp3lame\" },\n ];\n\n const osToBinMaps = [\n { os: \"win\", cmd: \"ffmpeg.exe\", discriminator: '\"' },\n { os: \"linux\", cmd: \"./ffmpeg\", discriminator: '\\'' },\n { os: \"osx\", cmd: \"./ffmpeg\", discriminator: '\\'' },\n ];\n\n let fileNameWithoutExtension = fileName.split('.').slice(0, -1).join('.');\n fileNameWithoutExtension = fileNameWithoutExtension == 'input' ? 'output' : fileNameWithoutExtension;\n\n const osMap = osToBinMaps.filter(x => x.os == operatingSystem)[0];\n\n const codec = outputFormatCodecMaps.filter(x => x.format == outputFormat)[0].codec;\n const bin = osMap.cmd;\n const di = osMap.discriminator;\n \n return `${bin} -y`\n + ` -activation_bytes ${activationBytes} -i ${di}.\\\\${fileName}${di}`\n + ` -map_metadata 0`\n + ` -id3v2_version 3`\n + ` -codec:a ${codec}`\n + ` -vn ${di}${fileNameWithoutExtension}.${outputFormat}${di}`;\n }\n\n render() {\n const { classes, file, activationBytes} = this.props;\n const { expanded, outputFormat, operatingSystem } = this.state;\n return (\n
\n \n }\n aria-controls=\"panel2bh-content\"\n id=\"panel2bh-header\"\n >\n Command and Convert\n \n Generate ffmpeg command or convert in browser\n \n \n \n this.setState({ outputFormat: x })}\n />\n\n this.setState({ operatingSystem: x })}\n style={{ paddingLeft: '20px' }}\n />\n\n \n \n \n \n \n )\n }}\n\n />\n \n \n \n
\n );\n }\n}\n\nconst useStyles = theme => ({\n root: {\n width: '100%',\n\n },\n heading: {\n fontSize: theme.typography.pxToRem(15),\n flexBasis: '33.33%',\n flexShrink: 0,\n },\n secondaryHeading: {\n fontSize: theme.typography.pxToRem(15),\n color: theme.palette.text.secondary,\n },\n\n});\n\nexport default withStyles(useStyles)(ControlledAccordions);\n","export default class AaxHashAlgorithm {\n static Instance = new AaxHashAlgorithm();\n \n __fixed_key = [0x77, 0x21, 0x4d, 0x4b, 0x19, 0x6a, 0x87, 0xcd, 0x52, 0x00, 0x45, 0xfd, 0x20, 0xa5, 0x1d, 0x67];\n \n \n // Convert a hex string to a byte array\n __hexToBytes(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n \n return bytes;\n }\n \n // Convert a byte array to a hex string\n __bytesToHex(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n var current = bytes[i] < 0 ? bytes[i] + 256 : bytes[i];\n hex.push((current >>> 4).toString(16));\n hex.push((current & 0xF).toString(16));\n }\n return hex.join(\"\");\n }\n \n async __HashData(data) {\n let source = new Uint8Array(data);\n let buffer = await crypto.subtle.digest('SHA-1', source);\n return Array.from(new Uint8Array(buffer));\n }\n \n async CalculateChecksum(activationBytes) {\n let data = this.__hexToBytes(activationBytes);\n \n let intermediate_key = await this.__HashData(this.__fixed_key.concat(data));\n let intermediate_iv = await this.__HashData(this.__fixed_key.concat(intermediate_key).concat(data));\n let checksum = await this.__HashData(intermediate_key.slice(0, 16).concat(intermediate_iv.slice(0, 16)));\n \n return this.__bytesToHex(checksum);\n }\n \n static async CalculateChecksum(activationBytes){\n return AaxHashAlgorithm.Instance.CalculateChecksum(activationBytes);\n }\n}","import React, { useState } from 'react';\nimport { withStyles } from \"@material-ui/core/styles\";\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\n\nimport Link from '@material-ui/core/Link';\nimport Box from '@material-ui/core/Box';\nimport LockOutlinedIcon from '@material-ui/icons/LockOutlined';\nimport Typography from '@material-ui/core/Typography';\nimport Container from '@material-ui/core/Container';\n\nimport Dropzone from 'react-dropzone'\nimport IconButton from '@material-ui/core/IconButton';\nimport FileCopyOutlined from '@material-ui/icons/FileCopyOutlined';\nimport PublishOutlined from '@material-ui/icons/PublishOutlined';\n\n// import { useFilePicker } from 'react-sage'\n// import { FilePicker } from 'react-file-picker'\n\nimport { FilePicker } from '../src/Components'\n\n\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\n\nimport ControlledAccordions from './ControlledAccordions'\nimport OnlineConverter from \"./OnlineConverter\";\nimport 'react-notifications-component/dist/theme.css'\n\nimport ReactNotification from 'react-notifications-component'\nimport { store } from 'react-notifications-component';\n// import 'animate.css/animate.compat.css'\n\nimport AaxHashAlgorithm from './Utils/AaxHashAlgorithm'\n\n\nconst useStyles = theme => ({\n paper: {\n marginTop: theme.spacing(8),\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n avatar: {\n margin: theme.spacing(1),\n backgroundColor: theme.palette.secondary.main,\n },\n form: {\n width: '100%', // Fix IE 11 issue.\n marginTop: theme.spacing(1),\n },\n\n //Accordeon\n heading: {\n fontSize: theme.typography.pxToRem(15),\n flexBasis: '33.33%',\n flexShrink: 0,\n },\n secondaryHeading: {\n fontSize: theme.typography.pxToRem(15),\n color: theme.palette.text.secondary,\n },\n});\n\nclass ChecksumResolver extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n checksum: \"\",\n fileName: \"input.aax\"\n }\n }\n\n DarkerDisabledTextField = withStyles({\n root: {\n marginRight: 8,\n \"& .MuiInputBase-root.Mui-disabled\": {\n color: \"rgba(0, 0, 0, 0.6)\"\n }\n }\n })(TextField);\n\n Copyright = (function () {\n return (\n \n {'Copyright © '}\n \n audible-tools\n {' '}\n {new Date().getFullYear()}\n {'.'}\n \n );\n })\n\n setChecksum = (value) => {\n if (value.length > 40) {\n return;\n }\n this.setState({ checksum: value })\n }\n\n isChecksumValid = () => {\n const { checksum } = this.state;\n const regex = RegExp('[a-f0-9]{40}');\n const testResults = regex.test(checksum);\n\n return testResults;\n }\n\n isInputInvalid = () => {\n const { checksum } = this.state;\n if (!checksum || checksum === '') {\n return false;\n }\n return !this.isChecksumValid();\n };\n\n addNotification = function (text, success = true) {\n store.addNotification({\n message: text,\n type: success ? \"success\" : \"danger\",\n // type: \"danger\",\n insert: \"bottom-left\",\n container: \"top-full\",\n animationIn: [\"animate__animated\", \"animate__fadeIn\"],\n animationOut: [\"animate__animated\", \"animate__fadeOut\"],\n dismiss: {\n duration: 3000,\n onScreen: false\n }\n });\n }\n\n requestActivationBytes = async () => {\n const { checksum } = this.state;\n try {\n let request = await fetch(\"https://aax.api.j-kit.me/api/v2/activation/\" + checksum);\n let result = await request.json();\n const { success, activationBytes } = result;\n\n if (success !== true) {\n this.setState({ activationBytes: 'UNKNOWN' });\n this.addNotification(\"An error occured while resolving the activation bytes, please check your inputs\", false);\n return;\n }\n\n if (success === true) {\n const calculatedChecksum = await AaxHashAlgorithm.CalculateChecksum(activationBytes);\n if (calculatedChecksum == checksum) {\n this.setState({ activationBytes: activationBytes });\n this.addNotification(\"Successfully resolved the activation bytes\");\n return;\n }\n \n this.setState({ activationBytes: \"API ERROR\" });\n this.addNotification(\"An unexpected error occured while resolving the activation bytes, please try again\", false);\n\n }\n } catch (error) {\n this.setState({ activationBytes: error });\n this.addNotification(\"An error occured while resolving the activation bytes, please check your inputs\", false);\n }\n }\n\n buf2hex(buffer) { // buffer is an ArrayBuffer\n return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join('');\n }\n\n acceptFiles = async files => {\n const file = files[0];\n await this.acceptFile(file);\n }\n\n acceptFile = async file => {\n // if (!file.name.toLowerCase().endsWith(\".aax\")) {\n // alert('FileType not supported!');\n // return;\n // }\n\n this.setState({ fileName: file.name, file:file });\n const slic = file.slice(653, 653 + 20);\n const results = this.buf2hex(await slic.arrayBuffer());\n this.setChecksum(results)\n this.requestActivationBytes();\n\n }\n\n render() {\n const { classes } = this.props;\n const { checksum, activationBytes, fileName, file } = this.state;\n\n // const { files, onClick, errors, HiddenFileInput } = useFilePicker({\n // maxFileSize: 1000000,\n // maxImageWidth: 1000,\n // imageQuality: 0.92,\n // resizeImage: true\n // });\n\n return (\n \n\n \n
\n \n \n \n \n AAX Checksum Resolver\n \n\n
\n {\n console.log(acceptedFiles);\n this.acceptFiles(acceptedFiles);\n }}>\n {({ getRootProps, getInputProps }) => (\n
\n
\n \n this.setChecksum(x.target.value)}\n value={checksum}\n InputProps={{\n readOnly: false,\n endAdornment: (\n \n \n \n \n \n )\n }}\n\n />\n
\n
\n )}\n \n\n {\n this.requestActivationBytes();\n }}\n disabled={!this.isChecksumValid()}\n >\n Request Activation Bytes\n \n\n \n \n \n \n \n )\n }}\n\n />\n\n \n
\n \n \n \n \n\n\n\n
\n );\n }\n}\n\nexport default withStyles(useStyles)(ChecksumResolver);\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport * as serviceWorker from './serviceWorker';\nimport ChecksumResolver from './ChecksumResolver';\nimport ReactNotification from 'react-notifications-component'\nimport ForkMeOnGithub from 'fork-me-on-github';\n\n\nimport ReactGA from 'react-ga';\nReactGA.initialize('UA-174657678-1');\nReactGA.pageview(window.location.pathname + window.location.search);\n\nReactDOM.render(\n
\n
\n \n\n
\n \n \n
,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file