"use strict"
define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0})
var o=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(o,r.default.modulePrefix),e.default=o}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component,n=Ember.computed
e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component,n=Ember.Object,r=Ember.isEmpty
e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath")
if(r(e))return[]
var t=[]
return e.split("/").reject(function(e){return r(e)}).forEach(function(r){var o=e.match("(.*"+r+")/")[0]
t.pushObject(n.create({name:r,path:o}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component
e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component
e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items")
return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports","npm:json-tree-view"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0})
var n=Ember.Component,r=Ember.inject.service,o=Ember.observer,i=Ember.computed.alias,s=Ember.run.scheduleOnce
e.default=n.extend({storage:r(),classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,isJSON:null,type:i("metaData.type"),isBinary:i("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path")
this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),r=new window.Blob([n],{type:t.contentType})
e.set("objectURL",window.URL.createObjectURL(r))}else e.set("fileContent",t.data)
e.set("fileLoaded",!0)})}.on("didInsertElement"),onFileLoaded:o("fileLoaded",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),onJsonViewChanged:o("jsonShowTree",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&s("afterRender",this,"renderJsonTree")}),renderJsonTree:function(){var e=JSON.parse(this.get("fileContent")),n=new t.default("content",e)
n.on("change",function(e,t,n,r){console.log("change",t,n,"=>",r)}),n.on("rename",function(e,t,n,r){console.log("rename",t,n,"=>",r)}),n.on("delete",function(e,t){console.log("delete",t)}),n.on("append",function(e,t,n,r){console.log("append",t,n,"=>",r)}),n.on("click",function(e,t,n){console.log("click",t,"=",n)}),n.on("expand",function(e,t,n){console.log("expand",t,"=",n)}),n.on("collapse",function(e,t,n){console.log("collapse",t,"=",n)}),n.on("refresh",function(e,t,n){console.log("refresh",t,"=",n)}),document.getElementById("json-tree-view").appendChild(n.dom),window.jsonview=n,n.expand(!0),n.withRootName=!1,n.readonly=!0,this.set("jsonTreeView",n)}})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"7Q1kHSb6",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[4,"if",[[20,["isJSON"]]],null,{"statements":[[4,"if",[[20,["jsonShowTree"]]],null,{"statements":[[0,"        "],[6,"div"],[9,"id","json-tree-view"],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"        "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0,"      "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component
e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type")
return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Controller,n=Ember.Object,r=Ember.computed,o=Ember.observer,i=Ember.inject.service,s=Ember.computed.alias,a=Ember.isEmpty
e.default=t.extend({storage:i(),connecting:s("storage.connecting"),connected:s("storage.connected"),userAddress:s("storage.userAddress"),rootListing:s("storage.rootListing"),currentDirPath:null,connectedClass:r("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing")
return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:o("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.observer,s=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all
e.default=t.extend({application:n(),storage:r(),connected:s("storage.connected"),rootListing:s("storage.rootListing"),currentDirPath:s("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:o("currentListing.[]",function(){return l(this.get("currentListing"))?[]:this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:o("documents.[]",function(){return a(this.get("documents"))}),documentCount:o("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:o("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)})
return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:i("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="This will delete all "+this.get("documentCount")+" documents/files in the current directory. Are you sure?"
if(!window.confirm(t))return!1
var n=this.get("storage.client"),r=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)})
c(r).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Controller,n=Ember.inject.controller,r=Ember.inject.service,o=Ember.computed,i=Ember.computed.alias,s=Ember.isEmpty
e.default=t.extend({application:n(),storage:r(),currentDirPath:i("application.currentDirPath"),queryParams:["path"],documentIsJSON:o("model.documentMetaData.type",function(){return!s(this.get("model.documentMetaData"))&&!!this.get("model.documentMetaData.type").match(/application\/json/i)}),jsonView:"tree",jsonShowTree:o.equal("jsonView","tree"),jsonShowSource:o.equal("jsonView","source"),actions:{showJsonTree:function(){this.set("jsonView","tree")},showJsonSource:function(){this.set("jsonView","source")},deleteItem:function(){var e=this
window.confirm("Sure?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
return t.hideSha?o.match(n.versionRegExp)[0]:t.hideVersion?o.match(n.shaRegExp)[0]:o}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r
var o=t.default.APP.version
e.default=Ember.Helper.helper(r)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Helper.helper
e.default=t(function(e){if(e<1024)return e+" bytes"
var t=-1
do{e/=1024,t++}while(e>1024)
return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0})
var r=n.default.APP,o=r.name,i=r.version
e.default={name:"App Version",initialize:(0,t.default)(o,i)}}),define("inspektor/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0]
e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0]
if(!1!==t.default.exportApplicationGlobal){var n
if("undefined"!=typeof window)n=window
else if("undefined"!=typeof global)n=global
else{if("undefined"==typeof self)return
n=self}var r,o=t.default.exportApplicationGlobal
r="string"==typeof o?o:Ember.String.classify(t.default.modulePrefix),n[r]||(n[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[r]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}})
define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0})
var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL})
n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0})
var n=Ember.Route,r=Ember.inject.service
e.default=n.extend(t.default,{storage:r(),beforeModel:function(){var e=this
this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service,r=Ember.run.later,o=Ember.RSVP.Promise
e.default=t.extend({storage:n(),beforeModel:function(){var e=this
return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this
return new o(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service
e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent,i=Ember.run.later,s=Ember.RSVP.hash,a=Ember.RSVP.Promise
e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this
return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path
return r(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),s({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&(e.set("currentDirPath",t.currentDirPath),r(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this
return new a(function(t){function n(){e.get("storage.connecting")?i(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service,r=Ember.isEmpty,o=Ember.isPresent
e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path
r(e.path),t.substr(-1)
var n=t.match(/^(.*\/).+$/)[1],o=t.match(/^.*\/(.+)$/)[1]
return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",o)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),r(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),o(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0})
var o=Ember.Object,i=Ember.Service,s=Ember.computed,a=Ember.observer,l=Ember.isEmpty
e.default=i.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:s.not("connected"),client:null,rootListing:null,setup:function(){var e=this,r=new t.default({cache:!1})
r.access.claim("*","rw")
var o=new n.default(r,{skipInitial:!0})
o.attach(),r.on("ready",function(){console.debug("rs.on ready")}),r.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),r.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),r.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),r.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",r),this.set("widget",o),this.set("client",r.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this
this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[]
return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(i){var s=n[i],a=s["Content-Type"]||"folder",l=!1
"folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,r.default)(a)),t.push(o.create({name:i,type:a,isBinary:l,isFolder:"folder"===a,size:s["Content-Length"]||null,path:e+i,etag:s.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"niZ23686",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[0,"delete all"],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"UoZns/4Y",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["documentIsJSON"]]],null,{"statements":[[0,"      "],[6,"div"],[9,"class","button-group json-view"],[7],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowTree"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowTree"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonTree"]],[7],[0,"tree view"],[8],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowSource"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowSource"]],"active"],null]]]],[3,"action",[[19,0,[]],"showJsonSource"]],[7],[0,"source"],[8],[0,"\\n      "],[8],[0,"\\n"]],"parameters":[]},null],[0,"    "],[6,"button"],[9,"class","delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[0,"delete"],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[9,"class","inspect-details"],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","isJSON","jsonShowTree","jsonShowSource"],[[20,["model","documentMetaData"]],[20,["documentIsJSON"]],[20,["jsonShowTree"]],[20,["jsonShowSource"]]]]],false],[0,"\\n  "],[8],[0,"\\n  "],[6,"section"],[9,"class","meta"],[7],[0,"\\n    "],[6,"dl"],[7],[0,"\\n      "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n      "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n      "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n    "],[8],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))}
return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.1+41161308"})
