text: ComponentJS.plugin("localstorage",function(a,b,c){if("undefined"===a.istypeof(c.localStorage))throw a.exception("plugin:localstorage",'sorry, mandatory HTML5 "localStorage" facility not supported by run-time environment');if("undefined"===a.istypeof(c.JSON))throw a.exception("plugin:localstorage",'sorry, mandatory JavaScript "JSON" encoding/decoding not supported by run-time environment');if("undefined"==typeof c.document||"undefined"==typeof c.document.location||"undefined"==typeof c.document.location.pathname)throw a.exception("plugin:localstorage",'sorry, mandatory DOM "document location" facility not supported by run-time environment');var d=function(a){var b="ComponentJS:store:";return b+=c.document.location.pathname,b+=":"+a.path("/")};a.latch("ComponentJS:store-load",function(a){var b=d(a),e=c.localStorage.getItem(b);"string"==typeof e&&(a.__store=c.JSON.parse(e))}),a.latch("ComponentJS:store-save",function(a){var b=d(a),e=c.JSON.stringify(a.__store);"{}"===e?c.localStorage.removeItem(b):c.localStorage.setItem(b,e)})});