From 18994fa8d24b4fb2f2219e50894eb7d30878fb03 Mon Sep 17 00:00:00 2001
From: Tyler Frankenstein
Date: Wed, 7 Sep 2022 11:57:01 -0400
Subject: [PATCH] Update binary.
---
drupalgap.min.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drupalgap.min.js b/drupalgap.min.js
index 1b73aa5c..45d72270 100644
--- a/drupalgap.min.js
+++ b/drupalgap.min.js
@@ -1,3 +1,3 @@
-function core_rest_pre_process(e,t){dg.spinnerShow()}function core_rest_post_process(e){dg.spinnerHide()}function core_pre_process_route_change(e,t){dg.clearBuckets()}function system_pre_process_route_change(e,t){if("undefined"!=typeof t){var r=dg.blocksLoad();for(var o in r)if(r.hasOwnProperty(o)){var n=r[o],i=n.getRegion();i&&i.getHiddenBlocks().length==i.getBlocks().length&&dg.removeBodyClass("no-"+i.get("id"))}}}var dg={activeTheme:null,blocks:null,regions:null,spinner:0,themes:{},_title:"",_continued:!1,_postRenderMax:128,_libraries:{},_messages:[]},drupalgap=dg;dg.settings={mode:"web-app",front:null,blocks:{}},dg.start=function(){dg.isCompiled()?document.addEventListener("deviceready",dg.deviceready,!1):dg.deviceready()},dg.deviceready=function(){dg.bootstrap(),jDrupal.moduleInvokeAll("deviceready").then(function(){jDrupal.moduleImplements("deviceready")||dg._continued||jDrupal.connect().then(dg.continue,function(){console.log("deviceready connect failed",arguments)})})},dg.bootstrap=function(){dg.router.config({});var e=jDrupal.modulesLoad(),t=[];for(var r in e)if(e.hasOwnProperty(r)){var o=dg.getModuleRoutes(r);if(o)for(var n in o)if(o.hasOwnProperty(n)){var i=o[n];i.key=n,dg.router.add(i);var d=dg.router.hasBaseRoute(i);if(d){var u=dg.router.getBaseRoute(i);u?dg.router.saveAsChildRoute(i,u):t.push(i)}}}var a=t.length;if(a)for(var s=0;s=0;r--)if(t[r]===e){t.splice(r,1);break}},dg.setTitle=function(e,t,r){"undefined"==typeof t&&(t=!0),"undefined"==typeof r&&(r=!0),e=e?e:"","object"==typeof e&&(e=e._title?e._title:""),dg._title=e,t&&dg.setDocumentTitle(e),r&&dg.setPageTitle(e)},dg.getDocumentTitle=function(){return document.title},dg.setDocumentTitle=function(e){e=e?e:dg.config("title"),document.title=dg.theme("document_title",{_title:dg.t(e)})},dg.setPageTitle=function(e){var t=document.getElementById("title");t&&(t.innerHTML="string"==typeof e?dg.theme("title",{_title:e}):dg.render(e))},dg.attrs=function(e){var t=e._attributes;return t?dg.attributes(t):""},dg.attributes=function(e){var t="";if(e)for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];Array.isArray(o)&&o.length?t+=r+'="'+o.join(" ")+'" ':null===o?t+=" "+r+" ":""!=o?t+=r+'="'+o+'" ':"class"!=r&&(t+=r+" ")}return t},dg.attributesInit=function(e){var t=e._attributes?e._attributes:{};t.class?"string"==typeof t.class&&(t.class=[t.class]):t.class=[],e._attributes=t},dg.setVar=function(e,t){window.localStorage.setItem(e,JSON.stringify(t))},dg.getVar=function(e,t){var r=JSON.parse(window.localStorage.getItem(e));return null===r&&"undefined"!=typeof t?(dg.setVar(e,t),t):r},dg.deleteVar=function(e){return window.localStorage.removeItem(e)},dg.applyToConstructor=function(e,t){var r=[null].concat(t),o=e.bind.apply(e,r);return new o},dg.cleanCssIdentifier=function(e){return e.replace(/_/g,"-").toLowerCase()},dg.getCamelCase=function(e){return e.replace(/[-_]([a-z])/g,function(e){return e[1].toUpperCase()})},dg.extend=function(e,t){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];jDrupal.isEmpty(o)||(e[r]=o)}return e},dg.killCamelCase=function(e,t){return t||(t="-"),jDrupal.lcfirst(e).replace(/([A-Z])/g,t+"$1").toLowerCase()},dg.inArray=function(e,t){return jDrupal.inArray(e,t)},dg.imagePath=function(e){var t=dg.restPath()+e;return t.indexOf("public://")!=-1?t=t.replace("public://",dg.config("files").publicPath+"/"):t.indexOf("private://")!=-1&&(t=t.replace("private://",dg.config("files").privatePath+"/")),t},dg.elementAttributesInit=function(e){dg.attributesInit(e)},dg.b=function(e,t){return t||(t={}),t._value||(t._value=e),dg.theme("button",t)},dg.l=function(e,t,r){return r||(r={}),r._text||(r._text=e),r._path||(r._path=t),dg.theme("link",r)},dg.bl=function(e,t,r){return this.l.apply(this,arguments)},dg.removeElement=function(e){var t=dg.qs("#"+e);t&&t.parentElement.removeChild(t)},dg.t=function(e,t,r){if(t)for(var o in t)t.hasOwnProperty(o)&&(e=e.replace(o,t[o]));return e},dg.formatPlural=function(e,t,r){return 1==parseInt(e)?t:r},dg.Node=function(e){return new jDrupal.Node(e)},dg.entityController=function(e){var t={};return t.entity={_theme:"bucket",_grab:function(){var t=dg.router.getActiveRoute(),r=t.defaults._entity_type,o=dg.getCamelCase(r)+"Load";return new Promise(function(r,n){dg[o](e).then(function(e){t.defaults._handler(e,r,n)})})}},t},dg.forms={},dg.theme_form=function(e){var t="dg.theme_form - ",r="";e._id||(r="missing _id");var o=e._id,n=window[o];if(n||(r="form id not found: "+o),""!=r)return console.log(t+r),"";var i=dg.killCamelCase(o,"-");e._attributes.id="form-wrapper-"+i,e._node&&(e._attributes.id+="-"+e._node.nid);var d=e._attributes.id;return dg.render({_markup:"
",_postRender:[function(){var r=dg.addForm(o,dg.applyToConstructor(n));r.getForm(e).then(function(e){var o=r.form,n=dg.qs("#"+d);return n?(n.innerHTML=e,dg.formHasActions(o)&&dg.formAttachSubmissionHandler(o._attributes.id),void dg.runPostRenders()):void console.log(t+"form wrapper missing: "+d)})}]})},dg.formDomIdFromId=function(e){return dg.killCamelCase(e,"-").toLowerCase()},dg.Form=function(e){this.id=e,this.form={_attributes:{id:dg.formDomIdFromId(e),class:[]},_validate:[e+".validateForm"],_submit:[e+".submitForm"],_after_build:[]},this.form_state=new dg.FormStateInterface(this),this.elements={}},dg.Form.prototype.get=function(e){return"undefined"!=typeof this[e]?this[e]:null},dg.Form.prototype.getFormId=function(){return this.get("id")},dg.Form.prototype.getFormDomId=function(){return this.form._attributes.id},dg.Form.prototype.getForm=function(){var e=this,t=arguments;return new Promise(function(r,o){var n=function(){e.form._attributes["data-id"]=e.id;for(var t in e.form)if(dg.isFormElement(t,e.form)){var o=e.form[t];if("actions"==o._type){dg.setFormElementDefaults(t,o);for(var n in o)dg.isFormElement(n,o)&&dg.setFormElementDefaults(n,o[n])}else dg.setFormElementDefaults(t,o)}var i=jDrupal.moduleInvokeAll("form_alter",e.form,e.getFormState(),e.getFormId()),d=function(){for(var t in e.form)if(dg.isFormElement(t,e.form)){var o=e.form[t];switch(o._type||(o._type="markup"),o._widgetType||(o._widgetType="FormElement"),o._widgetType){case"FieldWidget":case"FormWidget":var n=e.form._entity.get(t),i=0,d=new dg.modules[o._module][o._widgetType][o._type](e.form._entityType,e.form._bundle,t,o,n,i);if(e.elements[t]=d,d.form(n,i,o,e.form,e.form_state),"hidden"==o._type){e.form[t]=o;continue}var u={};o._title&&(u.label={_theme:"form_element_label",_title:o._title}),u.element=o;var a={_theme:"container",_children:u,_weight:o._weight};e.form[t]=a;break;case"FormElement":default:var s=o._widgetType;if(o._type){var l=jDrupal.ucfirst(dg.getCamelCase(o._type))+"Element";dg[l]&&(s=l)}var g=new dg[s](t,o,e);if(e.elements[t]=g,jDrupal.inArray(o._type,["hidden","markup"]))continue;var c=o._attributes,m=!!c.placeholder,f=!!o._description,p=f?c.id+"-description":null;f&&(o._attributes["aria-describedby"]=p);var u={_attributes:{class:[]}};o._title&&!m&&("checkbox"==o._type||(u.label={_theme:"form_element_label",_title:o._title,_attributes:{class:[],for:o._attributes.id}})),u.element=g,o._description&&(u.description={_theme:"description",_description:o._description,_attributes:{id:p}});var a={_theme:"container",_children:u,_attributes:{class:[]},_weight:o._weight};e.form[t]=a}}for(var h=[],_=0;_"+dg.render(e.form)+"")})};i?i.then(d):d()};if(t.length){for(var i=[e.form,e.form_state],d=0;d"+e._title+""},dg.theme_actions=function(e){var t="";for(prop in e)dg.isFormElement(prop,e)&&(t+=dg.render(e[prop]));return t},dg.theme_checkbox=function(e){e._attributes.type="checkbox",e._attributes.id||(e._attributes.id="checkbox-"+dg.salt()),e._default_value&&(e._attributes.checked="checked");var t=e._label;t||(t={}),dg.elementAttributesInit(t),t._title||(t._title=e._title);var r=t._attributes;r.for||(r.for=e._attributes.id);var t=dg.theme("label",t),o=e._prefix?e._prefix:"",n=e._suffix?e._suffix:"";return o+" "+t+n},dg.theme_checkboxes=function(e){var t="";for(var r in e._options)if(e._options.hasOwnProperty(r)){var o=e._options[r],n="object"!=typeof o?{_title:jDrupal.isEmpty(o)?r:o}:o;n._attributes||(n._attributes={}),"undefined"==typeof n._attributes.value&&(n._attributes.value=r),e._default_value&&e._default_value[r]&&(n._default_value=e._default_value[r]),t+=dg.theme("checkbox",n)+" "}return""+t+"
"},dg.theme_description=function(e){return""+e._description+" "},dg.theme_email=function(e){return e._attributes.type="email"," "},dg.theme_hidden=function(e){return e._attributes.type="hidden"," "},dg.theme_label=function(e){return" "+e._title+" "},dg.theme_number=function(e){return e._attributes.type="number"," "},dg.theme_password=function(e){return e._attributes.type="password"," "},dg.theme_radio=function(e){e._attributes.type="radio";var t=e._title?e._title:null,r=e._title_attributes?e._title_attributes:{};r.for||(r.for=e._attributes.id);var o=" ";return t&&(o+=""+t+" "),o},dg.theme_radios=function(e){var t="";for(var r in e._options)if(e._options.hasOwnProperty(r)){var o=e._options[r],n={_title:jDrupal.isEmpty(o)?r:o,_attributes:{value:r,name:e._attributes.name}};e._default_value==r&&(n._attributes.checked="checked"),t+=""+dg.theme("radio",n)+"
"}return""+t+"
"},dg.theme_select=function(e){var t="";if(e._options)for(var r in e._options)if(e._options.hasOwnProperty(r)){var o=e._options[r];if("object"==typeof o)"undefined"!=typeof e._value&&e._value==r&&(o._attributes.selected=""),t+=dg.render(o);else{var n="";"undefined"!=typeof e._value&&e._value==r&&(n=" selected "),t+='"+o+" "}}return""+t+" "},dg.theme_submit=function(e){return e._attributes.type="submit",!e._attributes.value&&e._value&&(e._attributes.value=e._value)," "},dg.theme_textarea=function(e){var t=e._value?e._value:"";return""},dg.theme_textfield=function(e){return e._attributes.type="text"," "},dg.FormStateInterface=function(e){this.form=e,this.values={},this.errors={}},dg.FormStateInterface.prototype.get=function(e){return"undefined"!=typeof this[e]?this[e]:null},dg.FormStateInterface.prototype.set=function(e,t){this[e]=t},dg.FormStateInterface.prototype.setFormState=function(){var e=this,t=e.get("form"),r=[];for(var o in t.elements)t.elements.hasOwnProperty(o)&&"actions"!=o&&"markup"!=t.elements[o].element._type&&r.push(t.elements[o].valueCallback());return Promise.all(r).then(function(t){for(var r=0;r=2){for(var o=encodeURIComponent(t)+"=",n=r[1].split(/[&;]/g),i=n.length;i-- >0;)n[i].lastIndexOf(o,0)!==-1&&n.splice(i,1);return r[0]+(n.length>0?"?"+n.join("&"):"")}return e},dg.hasAttachments=function(e){return!!e._attached},dg.addAttachments=function(e){var t=function(e,t){return new Promise(function(r,o){var n=t.length,i=0,d=0,u=function(){var o=t[d];if(dg.libraryLoaded(e,o))return i++,d++,void r();var a=dg.getModuleLibrary(e,o),s=a.js?a.js.length:0,l=(a.css?a.css.length:0,0),g=0,c=function(){var t=a.js[g];t._attributes.onload=function(){if(l++,g++,l"+n.get("prefix");for(var u=0;u"+s+">"+a.get("after")}o+=n.get("suffix")+""+d+">"+n.get("after")}}o+=dg.render(e),document.getElementById("dg-app").innerHTML=o,window.scrollTo(0,0);var l=dg.blocksLoad(),g=[],c=function(e){var t=e.getRegion();if(t.getBlocks().length==t.getHiddenBlocks().length){var r=t.get("id");dg.removeElement(dg.cleanCssIdentifier(r)),dg.addBodyClass("no-"+r)}if(g.splice(g.indexOf(e.get("id")),1),0==g.length){dg.runPostRenders();var o=dg.loadForms();for(var n in o)o.hasOwnProperty(n)&&dg.formAttachSubmissionHandler(o[n].getFormDomId())}};for(r in l)l.hasOwnProperty(r)&&(g.push(r),l[r].getVisibility().then(function(e){if(e.visible)e.block.buildWrapper().then(function(e){e.render(),c(e)});else{var t=e.block,r=t.get("id"),o=dg.regions[t.get("region")];o.addHiddenBlock(r),dg.removeElement(dg.cleanCssIdentifier(r)),c(e.block)}}))}),i=function(){var e={};for(var t in dg.regions)if(dg.regions.hasOwnProperty(t))for(var r=dg.regions[t].getBlocks(),o=0;o'+u+">",_postRender:[function(){dg.addAttachments(e).then(function(){var t=document.getElementById(d);e._attached.onload&&setTimeout(e._attached.onload,1),delete e._attached,t.outerHTML=dg.render(e,!0)})}]},!0)}e.markup&&(console.log('Use "_markup" instead of "markup" in:',e),e._markup=e.markup);var a=e._prefix?e._prefix:"",s=e._suffix?e._suffix:"";if(dg.isObject(a)&&(a=dg.render(a)),dg.isObject(s)&&(s=dg.render(s)),dg.isUndefined(e._postRender)&&(e._postRender=[]),e._markup)return dg.prepPostRenders(e),t&&setTimeout(dg.runPostRenders,1),a+e._markup+s;var l=!!e._theme,g=!!e._type;if(l||g){var c=a+dg.theme(l?e._theme:e._type,e)+s;return dg.prepPostRenders(e),c}var m=null,f={},p=0;o+=a;for(var h in e)if(e.hasOwnProperty(h)&&!jDrupal.inArray(h,dg.renderProperties())){var _=e[h],v=typeof _;if("object"===v&&null!==_)m="undefined"!=typeof _._weight?_._weight:0,dg.isUndefined(f[m])&&(f[m]=[]),f[m].push(dg.render(_)),p++;else if("array"===v)for(var y=0;y<_.length;y++)o+=dg.render(_[y]);else if("string"===v){if("object"===r&&e.role&&"form"===e.role||"_action"===h||""===_)continue;var b=e.constructor.name;b&&"Array"!==b&&(m=0,dg.isUndefined(f[m])&&(f[m]=[]),f[0].push(_),p++)}}if(p)for(m in f)if(f.hasOwnProperty(m))for(var y=0;ydg._postRenderMax){console.log("dg._postRenderMax reached: "+dg._postRenderMax),dg._postRender=[];break}dg._postRender[t]()}dg._postRender=[]}};e?setTimeout(r,t):r()},dg.token=function(){return jDrupal.token()},dg.restPath=function(){return jDrupal.restPath()},dg.path=function(){return jDrupal.path()},dg.commentLoad=function(){return jDrupal.commentLoad.apply(jDrupal,arguments)},dg.nodeLoad=function(){return jDrupal.nodeLoad.apply(jDrupal,arguments)},dg.userLoad=function(){return jDrupal.userLoad.apply(jDrupal,arguments)},dg.viewsLoad=function(){return jDrupal.viewsLoad.apply(jDrupal,arguments)},dg.router={_activeRoute:null,_stack:[],routes:[],mode:null,root:"/",config:function(e){return this.mode=e&&e.mode&&"history"==e.mode&&history.pushState?"history":"hash",this.root=e&&e.root?"/"+this.clearSlashes(e.root)+"/":"/",this},getPath:function(){var e="";if("history"===this.mode)e=this.clearSlashes(decodeURI(location.pathname+location.search)),e=e.replace(/\?(.*)$/,""),e="/"!=this.root?e.replace(this.root,""):e;else{var t=window.location.href.match(/#(.*)$/);e=t?t[1]:""}return dg.removeQueryString(this.clearSlashes(e))},getFragment:function(){return console.log("WARNING: getFragment() is deprecated, use getPath() instead."),this.getPath()},prepFragment:function(e){var t=e||this.getPath();return this.root+t},clearSlashes:function(e){return e.toString().replace(/\/$/,"").replace(/^\//,"")},add:function(e){return this.routes.push(e),this},remove:function(e){for(var t,r=0;r1?(o.shift(),dg.addForm(n,dg.applyToConstructor(window[n],o)).getForm().then(e)):dg.addForm(n,new window[n]).getForm().then(e)}else{var i=null;o.length>1?(o.shift(),i=t.defaults._controller.apply(null,o)):i=t.defaults._controller(),jDrupal.isPromise(i)?i.then(e):e(i)}},listen:function(){var e=this,t=e.getPath(),r=function(){if(t!==e.getPath()){var r=t;t=e.getPath(),e.check(t,r)}};return clearInterval(this.interval),this.interval=setInterval(r,50),this},load:function(e){var t=this.matches(e);return t?this.routes[t.i]:null},matches:function(e){for(var t=dg.removeQueryString(this.prepFragment(e)),r=0;r"):s},dg.setRenderElementDefaults=function(e){if("object"==typeof e){"undefined"==typeof e._attributes&&(e._attributes={}),"undefined"==typeof e._attributes.class&&(e._attributes.class=[]);for(var t in e)e.hasOwnProperty(t)&&!dg.isProperty(t,e)&&"object"==typeof e[t]&&dg.setRenderElementDefaults(e[t])}},dg.hasRole=function(e){return jDrupal.currentUser().hasRole(e)},dg.isAdmin=function(){return dg.hasRole("administrator")},dg.theme_view=function(e){return e._attributes.id||(e._attributes.id="view-"+dg.userPassword()),new Promise(function(t){jDrupal.viewsLoad(e._path).then(function(r){var o="",n=e._format?e._format:"div",i=e._format_attributes?e._format_attributes:null;if(e._title&&(o+="object"==typeof e._title?dg.render(e._title):""+e._title+" "),o+="<"+n+" "+dg.attributes(i)+">",r.results.length>0){for(var d=0;d",a="";break;case"table":u="",a=" "}o+=u+e._row_callback(r.results[d])+a}var s=e._contentPrefix?e._contentPrefix:"",l=e._contentSuffix?e._contentSuffix:"";"object"==typeof s&&(s=dg.render(s)),"object"==typeof l&&(l=dg.render(l)),o=s+o+l}else e._empty&&(o+="object"==typeof e._empty?dg.render(e._empty):''+e._empty+"
");o+=""+n+">",t({variables:e,content:o})})})},dg.modules.admin=new dg.Module,dg.modules.admin.blocks=function(){var e={};return e.admin_menu={build:function(){return new Promise(function(e,t){var r={};r.menu={_theme:"item_list",_title:"Administer",_items:[dg.l(dg.t("Content"),"node/add")]},e(r)})}},e},dg.modules.core=new dg.Module,dg.modules.core=new dg.Module,dg.modules.core.FieldFormatter={},dg.modules.core.FieldFormatter.entity_reference_label=function(){dg.FieldFormatterPrepare(this,arguments)},dg.modules.core.FieldFormatter.entity_reference_label.prototype=new dg.FieldFormatter,dg.modules.core.FieldFormatter.entity_reference_label.prototype.constructor=dg.modules.core.FieldFormatter.entity_reference_label,dg.modules.core.FieldFormatter.entity_reference_label.prototype.viewElements=function(e,t){var r=e.getItems(),o={};if(0==r.length)return o;for(var n=0;n"+n+"
"},r.header={_markup:""+dg.t("Resources")+" "},r.resources={_theme:"item_list",_items:[dg.l(dg.t("Hello World"),"http://docs.drupalgap.org/8/Hello_World"),dg.l(dg.t("Create a Module"),"http://docs.drupalgap.org/8/Modules/Create_a_Custom_Module")]},e(r)})}}},e["system.403"]={path:"/403",defaults:{_title:"403 - Access denied",_controller:function(){return new Promise(function(e,t){var r={msg:{_theme:"message",_type:"warning",_message:dg.t("You do not have access to this page.")}};e(r)})}}},e["system.404"]={path:"/404",defaults:{_title:"404 - Page not found",_controller:function(){return new Promise(function(e,t){e(dg.t("Sorry, that page was not found."))})}}},e},dg.modules.system.blocks=function(){var e={};return e.logo={build:function(){return new Promise(function(e,t){e(dg.config("logo"))})}},e.main={build:function(){return new Promise(function(e,t){e(dg.content)})}},e.main_menu={build:function(){return new Promise(function(e,t){var r={},o=[dg.l(dg.t("Home"),"")];r.menu={_theme:"item_list",_items:o},e(r)})}},e.primary_local_tasks=dg.modules.system.blockPrimaryLocalTasks(),e.powered_by={build:function(){return new Promise(function(e,t){var r={};r.list={_theme:"item_list",_title:dg.t("Powered by"),_items:[dg.l("DrupalGap","http://drupalgap.org"),dg.l("Drupal","http://drupal.org")]},e(r)})}},e.title={build:function(){return new Promise(function(e,t){var r=dg.getTitle();if("string"==typeof r){var o={_theme:"title",_title:dg.t(r)};e(o)}else e(r)})}},e.messages={build:function(){return new Promise(function(e,t){if(!dg.getMessageCount())return void e();for(var r={},o=dg.getMessages(),n=0;n"+t+">"+d,_postRender:[function(){o.render()}]},dg.render(n)}},dg._buckets={},dg.Bucket=function(e,t){this._id=e,this._vars=t,this.id=function(){return this._id},this.element=function(){return dg.qs("#"+this.id())},this.getVars=function(){return this._vars},this.refresh=function(){this.render()},this.render=function(){var e=this,t=this.getVars(),r=null;t._grab?r=t._grab():t._fill&&(r=new Promise(t._fill)),r.then(function(t){e.element().innerHTML=dg.render(t),dg.postRenderCount()&&dg.runPostRenders()})}},dg.getBuckets=function(){return dg._buckets},dg.getBucket=function(e){return dg._buckets[e]?dg._buckets[e]:null},dg.setBucket=function(e,t){dg._buckets[e]=t},dg.clearBuckets=function(){dg._buckets={}},dg.theme_button=function(e){return e._value||(e._value=""),e._attributes.type||(e._attributes.type="button"),""+e._value+" "},dg.theme_container=function(e){return""+dg.render(e._children)+"
"},dg.theme_document_title=function(e){return e._title+" | "+dg.config("title")},dg.theme_image_style=function(e){return e._path=dg.imageStyleUrl(e._style_name,e._path),dg.theme_image(e)},dg.imageStyleUrl=function(e,t){var r="public://",o=t.indexOf(r)!=-1,n=jDrupal.sitePath(),i=jDrupal.basePath();if(o){var d="sites/default/files/styles/"+e+"/public/",u=i+d;return(dg.isCompiled()?n+u:u)+t.replace(r,"")}return n+i+t},dg.theme_image=function(e){e._attributes.src=e._attributes.src?e._attributes.src:e._path;var t=e._attributes.src;return(t&&t.indexOf("public://")!=-1||t.indexOf("private://")!=-1)&&(e._attributes.src=dg.imagePath(t)),e._alt&&(e._attributes.alt=e._alt),e._title&&(e._attributes.title=e._title)," "},dg.theme_item_list=function(e){var t="",r=e._type?e._type:"ul",o=e._h?e._h:3;if(e._title&&(t+="object"==typeof e._title?dg.render(e._title):""+e._title+" "),e._items_prefix&&(t+=e._items_prefix),t+="<"+r+" "+dg.attributes(e._attributes)+">",e._items&&e._items.length>0){var n=e._itemType?e._itemType:"li";for(var i in e._items)e._items.hasOwnProperty(i)&&(t+=dg.theme("list_item",{_item:e._items[i],_itemType:n,_i:i,_total:e._items.length}))}return t+=""+r+">",e._items_suffix&&(t+=e._items_suffix),t},dg.theme_link=function(e){var t=e._text?e._text:"",r=e._path;""==r&&(r=dg.getFrontPagePath());
-var o=e._attributes;if("undefined"==typeof o.href&&r){var n=r;r.indexOf("http://")!=-1||r.indexOf("https://")!=-1||(n=0==r.indexOf("/")?r:"#"+r),r!=dg.getPath()||dg.inArray("active",o.class)||o.class.push("active"),n+=dg.extractQueryString(e),o.href=n}return e._inAppBrowser&&dg.isCompiled()&&dg_iab.init(e),""+t+" "},dg.theme_list_item=function(e){var t=e._item,r=e._itemType?e._itemType:"li",o=e._i;if("object"==typeof t){if(dg.setRenderElementDefaults(t),0==o?t._attributes.class.push("first"):o==t._total-1&&t._attributes.class.push("last"),t._theme&&"list_item"!=t._theme)return dg.theme(t._theme,t);var n=t._text?t._text:"";return"<"+r+" "+dg.attributes(t._attributes)+">"+dg.render(n)+""+r+">"}var i={};return 0==o?i.class=["first"]:o==t._total-1&&(i.class=["last"]),"<"+r+" "+dg.attributes(i)+">"+t+""+r+">"},dg.theme_message=function(e){var t=e._format?e._format:"div",r=e._type?e._type:null,o=e._attributes.class,n="messages";return dg.inArray(n,o)||o.push(n),r&&!dg.inArray(r,o)&&o.push(r),"<"+t+" "+dg.attrs(e)+">"+e._message+""+t+">"},dg.theme_table=function(e){var t="";if(e._header){t+="";for(var r=0;r'+o._text+"":''+o+" "}t+=" "}if(e._rows){t+="";for(var r=0;r";for(var i=0;i"+d+""}t+=""}else if(dg.isArray(n)){t+="";for(var i=0;i"+d+""}t+=" "}}t+=" "}return t+="
"},dg.theme_title=function(e){return""+e._title+" "};
\ No newline at end of file
+function core_rest_pre_process(e,t){dg.spinnerShow()}function core_rest_post_process(e){dg.spinnerHide()}function core_pre_process_route_change(e,t){dg.clearBuckets()}function system_pre_process_route_change(e,t){if("undefined"!=typeof t){var r=dg.blocksLoad();for(var o in r)if(r.hasOwnProperty(o)){var n=r[o],i=n.getRegion();i&&i.getHiddenBlocks().length==i.getBlocks().length&&dg.removeBodyClass("no-"+i.get("id"))}}}var dg={activeTheme:null,blocks:null,regions:null,spinner:0,themes:{},_title:"",_continued:!1,_postRenderMax:128,_libraries:{},_messages:[]},drupalgap=dg;dg.settings={mode:"web-app",front:null,blocks:{}},dg.start=function(){dg.isCompiled()?document.addEventListener("deviceready",dg.deviceready,!1):dg.deviceready()},dg.deviceready=function(){dg.bootstrap(),jDrupal.moduleInvokeAll("deviceready").then(function(){jDrupal.moduleImplements("deviceready")||dg._continued||jDrupal.connect().then(dg.continue,function(){console.log("deviceready connect failed",arguments)})})},dg.bootstrap=function(){dg.router.config({});var e=jDrupal.modulesLoad(),t=[];for(var r in e)if(e.hasOwnProperty(r)){var o=dg.getModuleRoutes(r);if(o)for(var n in o)if(o.hasOwnProperty(n)){var i=o[n];i.key=n,dg.router.add(i);var d=dg.router.hasBaseRoute(i);if(d){var u=dg.router.getBaseRoute(i);u?dg.router.saveAsChildRoute(i,u):t.push(i)}}}var a=t.length;if(a)for(var s=0;s=0;r--)if(t[r]===e){t.splice(r,1);break}},dg.setTitle=function(e,t,r){"undefined"==typeof t&&(t=!0),"undefined"==typeof r&&(r=!0),e=e?e:"","object"==typeof e&&(e=e._title?e._title:""),dg._title=e,t&&dg.setDocumentTitle(e),r&&dg.setPageTitle(e)},dg.getDocumentTitle=function(){return document.title},dg.setDocumentTitle=function(e){e=e?e:dg.config("title"),document.title=dg.theme("document_title",{_title:dg.t(e)})},dg.setPageTitle=function(e){var t=document.getElementById("title");t&&(t.innerHTML="string"==typeof e?dg.theme("title",{_title:e}):dg.render(e))},dg.attrs=function(e){var t=e._attributes;return t?dg.attributes(t):""},dg.attributes=function(e){var t="";if(e)for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];Array.isArray(o)&&o.length?t+=r+'="'+o.join(" ")+'" ':null===o?t+=" "+r+" ":""!=o?t+=r+'="'+o+'" ':"class"!=r&&(t+=r+" ")}return t},dg.attributesInit=function(e){var t=e._attributes?e._attributes:{};t.class?"string"==typeof t.class&&(t.class=[t.class]):t.class=[],e._attributes=t},dg.setVar=function(e,t){window.localStorage.setItem(e,JSON.stringify(t))},dg.getVar=function(e,t){var r=JSON.parse(window.localStorage.getItem(e));return null===r&&"undefined"!=typeof t?(dg.setVar(e,t),t):r},dg.deleteVar=function(e){return window.localStorage.removeItem(e)},dg.applyToConstructor=function(e,t){var r=[null].concat(t),o=e.bind.apply(e,r);return new o},dg.cleanCssIdentifier=function(e){return e.replace(/_/g,"-").toLowerCase()},dg.getCamelCase=function(e){return e.replace(/[-_]([a-z])/g,function(e){return e[1].toUpperCase()})},dg.extend=function(e,t){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];jDrupal.isEmpty(o)||(e[r]=o)}return e},dg.killCamelCase=function(e,t){return t||(t="-"),jDrupal.lcfirst(e).replace(/([A-Z])/g,t+"$1").toLowerCase()},dg.inArray=function(e,t){return jDrupal.inArray(e,t)},dg.imagePath=function(e){var t=dg.restPath()+e;return t.indexOf("public://")!=-1?t=t.replace("public://",dg.config("files").publicPath+"/"):t.indexOf("private://")!=-1&&(t=t.replace("private://",dg.config("files").privatePath+"/")),t},dg.elementAttributesInit=function(e){dg.attributesInit(e)},dg.b=function(e,t){return t||(t={}),t._value||(t._value=e),dg.theme("button",t)},dg.l=function(e,t,r){return r||(r={}),r._text||(r._text=e),r._path||(r._path=t),dg.theme("link",r)},dg.bl=function(e,t,r){return this.l.apply(this,arguments)},dg.removeElement=function(e){var t=dg.qs("#"+e);t&&t.parentElement.removeChild(t)},dg.t=function(e,t,r){if(t)for(var o in t)t.hasOwnProperty(o)&&(e=e.replace(o,t[o]));return e},dg.formatPlural=function(e,t,r){return 1==parseInt(e)?t:r},dg.Node=function(e){return new jDrupal.Node(e)},dg.entityController=function(e){var t={};return t.entity={_theme:"bucket",_grab:function(){var t=dg.router.getActiveRoute(),r=t.defaults._entity_type,o=dg.getCamelCase(r)+"Load";return new Promise(function(r,n){dg[o](e).then(function(e){t.defaults._handler(e,r,n)})})}},t},dg.forms={},dg.theme_form=function(e){var t="dg.theme_form - ",r="";e._id||(r="missing _id");var o=e._id,n=window[o];if(n||(r="form id not found: "+o),""!=r)return console.log(t+r),"";var i=dg.killCamelCase(o,"-");e._attributes.id="form-wrapper-"+i,e._node&&(e._attributes.id+="-"+e._node.nid);var d=e._attributes.id;return dg.render({_markup:"
",_postRender:[function(){var r=dg.addForm(o,dg.applyToConstructor(n));r.getForm(e).then(function(e){var o=r.form,n=dg.qs("#"+d);return n?(n.innerHTML=e,dg.formHasActions(o)&&dg.formAttachSubmissionHandler(o._attributes.id),void dg.runPostRenders()):void console.log(t+"form wrapper missing: "+d)})}]})},dg.formDomIdFromId=function(e){return dg.killCamelCase(e,"-").toLowerCase()},dg.Form=function(e){this.id=e,this.form={_attributes:{id:dg.formDomIdFromId(e),class:[]},_validate:[e+".validateForm"],_submit:[e+".submitForm"],_after_build:[]},this.form_state=new dg.FormStateInterface(this),this.elements={}},dg.Form.prototype.get=function(e){return"undefined"!=typeof this[e]?this[e]:null},dg.Form.prototype.getFormId=function(){return this.get("id")},dg.Form.prototype.getFormDomId=function(){return this.form._attributes.id},dg.Form.prototype.getForm=function(){var e=this,t=arguments;return new Promise(function(r,o){var n=function(){e.form._attributes["data-id"]=e.id;for(var t in e.form)if(dg.isFormElement(t,e.form)){var o=e.form[t];if("actions"==o._type){dg.setFormElementDefaults(t,o);for(var n in o)dg.isFormElement(n,o)&&dg.setFormElementDefaults(n,o[n])}else dg.setFormElementDefaults(t,o)}var i=jDrupal.moduleInvokeAll("form_alter",e.form,e.getFormState(),e.getFormId()),d=function(){for(var t in e.form)if(dg.isFormElement(t,e.form)){var o=e.form[t];switch(o._type||(o._type="markup"),o._widgetType||(o._widgetType="FormElement"),o._widgetType){case"FieldWidget":case"FormWidget":var n=e.form._entity.get(t),i=0,d=new dg.modules[o._module][o._widgetType][o._type](e.form._entityType,e.form._bundle,t,o,n,i);if(e.elements[t]=d,d.form(n,i,o,e.form,e.form_state),"hidden"==o._type){e.form[t]=o;continue}var u={};o._title&&(u.label={_theme:"form_element_label",_title:o._title}),u.element=o;var a={_theme:"container",_children:u,_weight:o._weight};e.form[t]=a;break;case"FormElement":default:var s=o._widgetType;if(o._type){var l=jDrupal.ucfirst(dg.getCamelCase(o._type))+"Element";dg[l]&&(s=l)}var g=new dg[s](t,o,e);if(e.elements[t]=g,jDrupal.inArray(o._type,["hidden","markup"]))continue;var c=o._attributes,m=!!c.placeholder,f=!!o._description,p=f?c.id+"-description":null;f&&(o._attributes["aria-describedby"]=p);var u={_attributes:{class:[]}};o._title&&!m&&("checkbox"==o._type||(u.label={_theme:"form_element_label",_title:o._title,_attributes:{class:[],for:o._attributes.id}})),u.element=g,o._description&&(u.description={_theme:"description",_description:o._description,_attributes:{id:p}});var a={_theme:"container",_children:u,_attributes:{class:[]},_weight:o._weight};e.form[t]=a}}for(var h=[],_=0;_"+dg.render(e.form)+"")})};i?i.then(d):d()};if(t.length){for(var i=[e.form,e.form_state],d=0;d"+e._title+""},dg.theme_actions=function(e){var t="";for(prop in e)dg.isFormElement(prop,e)&&(t+=dg.render(e[prop]));return t},dg.theme_checkbox=function(e){e._attributes.type="checkbox",e._attributes.id||(e._attributes.id="checkbox-"+dg.salt()),e._default_value&&(e._attributes.checked="checked");var t=e._label;t||(t={}),dg.elementAttributesInit(t),t._title||(t._title=e._title);var r=t._attributes;r.for||(r.for=e._attributes.id);var t=dg.theme("label",t),o=e._prefix?e._prefix:"",n=e._suffix?e._suffix:"";return o+" "+t+n},dg.theme_checkboxes=function(e){var t="";for(var r in e._options)if(e._options.hasOwnProperty(r)){var o=e._options[r],n="object"!=typeof o?{_title:jDrupal.isEmpty(o)?r:o}:o;n._attributes||(n._attributes={}),"undefined"==typeof n._attributes.value&&(n._attributes.value=r),e._default_value&&e._default_value[r]&&(n._default_value=e._default_value[r]),t+=dg.theme("checkbox",n)+" "}return""+t+"
"},dg.theme_description=function(e){return""+e._description+" "},dg.theme_email=function(e){return e._attributes.type="email"," "},dg.theme_hidden=function(e){return e._attributes.type="hidden"," "},dg.theme_label=function(e){return" "+e._title+" "},dg.theme_number=function(e){return e._attributes.type="number"," "},dg.theme_password=function(e){return e._attributes.type="password"," "},dg.theme_radio=function(e){e._attributes.type="radio";var t=e._title?e._title:null,r=e._title_attributes?e._title_attributes:{};r.for||(r.for=e._attributes.id);var o=" ";return t&&(o+=""+t+" "),o},dg.theme_radios=function(e){var t="";for(var r in e._options)if(e._options.hasOwnProperty(r)){var o=e._options[r],n={_title:jDrupal.isEmpty(o)?r:o,_attributes:{value:r,name:e._attributes.name}};e._default_value==r&&(n._attributes.checked="checked"),t+=""+dg.theme("radio",n)+"
"}return""+t+"
"},dg.theme_select=function(e){var t="";if(e._options)for(var r in e._options)if(e._options.hasOwnProperty(r)){var o=e._options[r];if("object"==typeof o)"undefined"!=typeof e._value&&e._value==r&&(o._attributes.selected=""),t+=dg.render(o);else{var n="";"undefined"!=typeof e._value&&e._value==r&&(n=" selected "),t+='"+o+" "}}return""+t+" "},dg.theme_submit=function(e){return e._attributes.type="submit",!e._attributes.value&&e._value&&(e._attributes.value=e._value)," "},dg.theme_textarea=function(e){var t=e._value?e._value:"";return""},dg.theme_textfield=function(e){return e._attributes.type="text"," "},dg.FormStateInterface=function(e){this.form=e,this.values={},this.errors={}},dg.FormStateInterface.prototype.get=function(e){return"undefined"!=typeof this[e]?this[e]:null},dg.FormStateInterface.prototype.set=function(e,t){this[e]=t},dg.FormStateInterface.prototype.setFormState=function(){var e=this,t=e.get("form"),r=[];for(var o in t.elements)t.elements.hasOwnProperty(o)&&"actions"!=o&&"markup"!=t.elements[o].element._type&&r.push(t.elements[o].valueCallback());return Promise.all(r).then(function(t){for(var r=0;r=2){for(var o=encodeURIComponent(t)+"=",n=r[1].split(/[&;]/g),i=n.length;i-- >0;)n[i].lastIndexOf(o,0)!==-1&&n.splice(i,1);return r[0]+(n.length>0?"?"+n.join("&"):"")}return e},dg.hasAttachments=function(e){return!!e._attached},dg.addAttachments=function(e){var t=function(e,t){return new Promise(function(r,o){var n=t.length,i=0,d=0,u=function(){var o=t[d];if(dg.libraryLoaded(e,o))return i++,d++,void r();var a=dg.getModuleLibrary(e,o),s=a.js?a.js.length:0,l=(a.css?a.css.length:0,0),g=0,c=function(){var t=a.js[g];t._attributes.onload=function(){if(l++,g++,l"+n.get("prefix");for(var u=0;u"+s+">"+a.get("after")}o+=n.get("suffix")+""+d+">"+n.get("after")}}o+=dg.render(e),document.getElementById("dg-app").innerHTML=o,window.scrollTo(0,0);var l=dg.blocksLoad(),g=[],c=function(e){var t=e.getRegion();if(t.getBlocks().length==t.getHiddenBlocks().length){var r=t.get("id");dg.removeElement(dg.cleanCssIdentifier(r)),dg.addBodyClass("no-"+r)}if(g.splice(g.indexOf(e.get("id")),1),0==g.length){dg.runPostRenders();var o=dg.loadForms();for(var n in o)o.hasOwnProperty(n)&&dg.formAttachSubmissionHandler(o[n].getFormDomId())}};for(r in l)l.hasOwnProperty(r)&&(g.push(r),l[r].getVisibility().then(function(e){if(e.visible)e.block.buildWrapper().then(function(e){e.render(),c(e)});else{var t=e.block,r=t.get("id"),o=dg.regions[t.get("region")];o.addHiddenBlock(r),dg.removeElement(dg.cleanCssIdentifier(r)),c(e.block)}}))}),i=function(){var e={};for(var t in dg.regions)if(dg.regions.hasOwnProperty(t))for(var r=dg.regions[t].getBlocks(),o=0;o'+u+">",_postRender:[function(){dg.addAttachments(e).then(function(){var t=document.getElementById(d);e._attached.onload&&setTimeout(e._attached.onload,1),delete e._attached,t.outerHTML=dg.render(e,!0)})}]},!0)}e.markup&&(console.log('Use "_markup" instead of "markup" in:',e),e._markup=e.markup);var a=e._prefix?e._prefix:"",s=e._suffix?e._suffix:"";if(dg.isObject(a)&&(a=dg.render(a)),dg.isObject(s)&&(s=dg.render(s)),dg.isUndefined(e._postRender)&&(e._postRender=[]),e._markup)return dg.prepPostRenders(e),t&&setTimeout(dg.runPostRenders,1),a+e._markup+s;var l=!!e._theme,g=!!e._type;if(l||g){var c=a+dg.theme(l?e._theme:e._type,e)+s;return dg.prepPostRenders(e),c}var m=null,f={},p=0;o+=a;for(var h in e)if(e.hasOwnProperty(h)&&!jDrupal.inArray(h,dg.renderProperties())){var _=e[h],v=typeof _;if("object"===v&&null!==_)m="undefined"!=typeof _._weight?_._weight:0,dg.isUndefined(f[m])&&(f[m]=[]),f[m].push(dg.render(_)),p++;else if("array"===v)for(var y=0;y<_.length;y++)o+=dg.render(_[y]);else if("string"===v){if("object"===r&&e.role&&"form"===e.role||"_action"===h||""===_)continue;var b=e.constructor.name;b&&"Array"!==b&&(m=0,dg.isUndefined(f[m])&&(f[m]=[]),f[0].push(_),p++)}}if(p)for(m in f)if(f.hasOwnProperty(m))for(var y=0;ydg._postRenderMax){console.log("dg._postRenderMax reached: "+dg._postRenderMax),dg._postRender=[];break}dg._postRender[t]()}dg._postRender=[]}};e?setTimeout(r,t):r()},dg.token=function(){return jDrupal.token()},dg.restPath=function(){return jDrupal.restPath()},dg.path=function(){return jDrupal.path()},dg.commentLoad=function(){return jDrupal.commentLoad.apply(jDrupal,arguments)},dg.nodeLoad=function(){return jDrupal.nodeLoad.apply(jDrupal,arguments)},dg.userLoad=function(){return jDrupal.userLoad.apply(jDrupal,arguments)},dg.viewsLoad=function(){return jDrupal.viewsLoad.apply(jDrupal,arguments)},dg.router={_activeRoute:null,_stack:[],routes:[],mode:null,root:"/",config:function(e){return this.mode=e&&e.mode&&"history"==e.mode&&history.pushState?"history":"hash",this.root=e&&e.root?"/"+this.clearSlashes(e.root)+"/":"/",this},getPath:function(){var e="";if("history"===this.mode)e=this.clearSlashes(decodeURI(location.pathname+location.search)),e=e.replace(/\?(.*)$/,""),e="/"!=this.root?e.replace(this.root,""):e;else{var t=window.location.href.match(/#(.*)$/);e=t?t[1]:""}return dg.removeQueryString(this.clearSlashes(e))},getFragment:function(){return console.log("WARNING: getFragment() is deprecated, use getPath() instead."),this.getPath()},prepFragment:function(e){var t=e||this.getPath();return this.root+t},clearSlashes:function(e){return e.toString().replace(/\/$/,"").replace(/^\//,"")},add:function(e){return this.routes.push(e),this},remove:function(e){for(var t,r=0;r1?(o.shift(),dg.addForm(n,dg.applyToConstructor(window[n],o)).getForm().then(e)):dg.addForm(n,new window[n]).getForm().then(e)}else{var i=null;o.length>1?(o.shift(),i=t.defaults._controller.apply(null,o)):i=t.defaults._controller(),jDrupal.isPromise(i)?i.then(e):e(i)}},listen:function(){var e=this,t=e.getPath(),r=function(){if(t!==e.getPath()){var r=t;t=e.getPath(),e.check(t,r)}};return clearInterval(this.interval),this.interval=setInterval(r,50),this},load:function(e){var t=this.matches(e);return t?this.routes[t.i]:null},matches:function(e){for(var t=dg.removeQueryString(this.prepFragment(e)),r=0;r"):s},dg.setRenderElementDefaults=function(e){if("object"==typeof e){"undefined"==typeof e._attributes&&(e._attributes={}),"undefined"==typeof e._attributes.class&&(e._attributes.class=[]);for(var t in e)e.hasOwnProperty(t)&&!dg.isProperty(t,e)&&"object"==typeof e[t]&&dg.setRenderElementDefaults(e[t])}},dg.hasRole=function(e){return jDrupal.currentUser().hasRole(e)},dg.isAdmin=function(){return dg.hasRole("administrator")},dg.theme_view=function(e){return e._attributes.id||(e._attributes.id="view-"+dg.userPassword()),new Promise(function(t){jDrupal.viewsLoad(e._path).then(function(r){var o="",n=e._format?e._format:"div",i=e._format_attributes?e._format_attributes:null;if(e._title&&(o+="object"==typeof e._title?dg.render(e._title):""+e._title+" "),o+="<"+n+" "+dg.attributes(i)+">",r.results.length>0){for(var d=0;d",a="";break;case"table":u="",a=" "}o+=u+e._row_callback(r.results[d])+a}var s=e._contentPrefix?e._contentPrefix:"",l=e._contentSuffix?e._contentSuffix:"";"object"==typeof s&&(s=dg.render(s)),"object"==typeof l&&(l=dg.render(l)),o=s+o+l}else e._empty&&(o+="object"==typeof e._empty?dg.render(e._empty):''+e._empty+"
");o+=""+n+">",t({variables:e,content:o})})})},dg.modules.admin=new dg.Module,dg.modules.admin.blocks=function(){var e={};return e.admin_menu={build:function(){return new Promise(function(e,t){var r={};r.menu={_theme:"item_list",_title:"Administer",_items:[dg.l(dg.t("Content"),"node/add")]},e(r)})}},e},dg.modules.core=new dg.Module,dg.modules.core=new dg.Module,dg.modules.core.FieldFormatter={},dg.modules.core.FieldFormatter.entity_reference_label=function(){dg.FieldFormatterPrepare(this,arguments)},dg.modules.core.FieldFormatter.entity_reference_label.prototype=new dg.FieldFormatter,dg.modules.core.FieldFormatter.entity_reference_label.prototype.constructor=dg.modules.core.FieldFormatter.entity_reference_label,dg.modules.core.FieldFormatter.entity_reference_label.prototype.viewElements=function(e,t){var r=e.getItems(),o={};if(0==r.length)return o;for(var n=0;n"+n+""},r.header={_markup:""+dg.t("Resources")+" "},r.resources={_theme:"item_list",_items:[dg.l(dg.t("Hello World"),"http://docs.drupalgap.org/8/Hello_World"),dg.l(dg.t("Create a Module"),"http://docs.drupalgap.org/8/Modules/Create_a_Custom_Module")]},e(r)})}}},e["system.403"]={path:"/403",defaults:{_title:"403 - Access denied",_controller:function(){return new Promise(function(e,t){var r={msg:{_theme:"message",_type:"warning",_message:dg.t("You do not have access to this page.")}};e(r)})}}},e["system.404"]={path:"/404",defaults:{_title:"404 - Page not found",_controller:function(){return new Promise(function(e,t){e(dg.t("Sorry, that page was not found."))})}}},e},dg.modules.system.blocks=function(){var e={};return e.logo={build:function(){return new Promise(function(e,t){e(dg.config("logo"))})}},e.main={build:function(){return new Promise(function(e,t){e(dg.content)})}},e.main_menu={build:function(){return new Promise(function(e,t){var r={},o=[dg.l(dg.t("Home"),"")];r.menu={_theme:"item_list",_items:o},e(r)})}},e.primary_local_tasks=dg.modules.system.blockPrimaryLocalTasks(),e.powered_by={build:function(){return new Promise(function(e,t){var r={};r.list={_theme:"item_list",_title:dg.t("Powered by"),_items:[dg.l("DrupalGap","http://drupalgap.org"),dg.l("Drupal","http://drupal.org")]},e(r)})}},e.title={build:function(){return new Promise(function(e,t){var r=dg.getTitle();if("string"==typeof r){var o={_theme:"title",_title:dg.t(r)};e(o)}else e(r)})}},e.messages={build:function(){return new Promise(function(e,t){if(!dg.getMessageCount())return void e();for(var r={},o=dg.getMessages(),n=0;n"+t+">"+d,_postRender:[function(){o.render()}]},dg.render(n)}},dg._buckets={},dg.Bucket=function(e,t){this._id=e,this._vars=t,this.id=function(){return this._id},this.element=function(){return dg.qs("#"+this.id())},this.getVars=function(){return this._vars},this.refresh=function(){this.render()},this.render=function(){var e=this,t=this.getVars(),r=null;t._grab?r=t._grab():t._fill&&(r=new Promise(t._fill)),r.then(function(t){e.element().innerHTML=dg.render(t),dg.postRenderCount()&&dg.runPostRenders()})}},dg.getBuckets=function(){return dg._buckets},dg.getBucket=function(e){return dg._buckets[e]?dg._buckets[e]:null},dg.setBucket=function(e,t){dg._buckets[e]=t},dg.clearBuckets=function(){dg._buckets={}},dg.theme_button=function(e){return e._value||(e._value=""),e._attributes.type||(e._attributes.type="button"),""+e._value+" "},dg.theme_container=function(e){return""+dg.render(e._children)+"
"},dg.theme_document_title=function(e){return e._title+" | "+dg.config("title")},dg.theme_image_style=function(e){return e._path=dg.imageStyleUrl(e._style_name,e._path),dg.theme_image(e)},dg.imageStyleUrl=function(e,t){var r="public://",o=t.indexOf(r)!=-1,n=jDrupal.sitePath(),i=jDrupal.basePath();if(o){var d="sites/default/files/styles/"+e+"/public/",u=i+d;return(dg.isCompiled()?n+u:u)+t.replace(r,"")}return n+i+t},dg.theme_image=function(e){e._attributes.src=e._attributes.src?e._attributes.src:e._path;var t=e._attributes.src;return(t&&t.indexOf("public://")!=-1||t.indexOf("private://")!=-1)&&(e._attributes.src=dg.imagePath(t)),e._alt&&(e._attributes.alt=e._alt),e._title&&(e._attributes.title=e._title)," "},dg.theme_item_list=function(e){var t="",r=e._type?e._type:"ul",o=e._h?e._h:3;if(e._title&&(t+="object"==typeof e._title?dg.render(e._title):""+e._title+" "),e._items_prefix&&(t+=e._items_prefix),t+="<"+r+" "+dg.attributes(e._attributes)+">",e._items&&e._items.length>0){var n=e._itemType?e._itemType:"li";for(var i in e._items)e._items.hasOwnProperty(i)&&(t+=dg.theme("list_item",{_item:e._items[i],
+_itemType:n,_i:i,_total:e._items.length}))}return t+=""+r+">",e._items_suffix&&(t+=e._items_suffix),t},dg.theme_link=function(e){var t=e._text?e._text:"",r=e._path;""==r&&(r=dg.getFrontPagePath());var o=e._attributes;if("undefined"==typeof o.href&&r){var n=r;r.indexOf("http://")!=-1||r.indexOf("https://")!=-1||(n=0==r.indexOf("/")?r:"#"+r),r!=dg.getPath()||dg.inArray("active",o.class)||o.class.push("active"),n+=dg.extractQueryString(e),o.href=n}return e._inAppBrowser&&dg.isCompiled()&&dg_iab.init(e),""+t+" "},dg.theme_list_item=function(e){var t=e._item,r=e._itemType?e._itemType:"li",o=e._i;if("object"==typeof t){if(dg.setRenderElementDefaults(t),0==o?t._attributes.class.push("first"):o==t._total-1&&t._attributes.class.push("last"),t._theme&&"list_item"!=t._theme)return dg.theme(t._theme,t);var n=t._text?t._text:"";return"<"+r+" "+dg.attributes(t._attributes)+">"+dg.render(n)+""+r+">"}var i={};return 0==o?i.class=["first"]:o==t._total-1&&(i.class=["last"]),"<"+r+" "+dg.attributes(i)+">"+t+""+r+">"},dg.theme_message=function(e){var t=e._format?e._format:"div",r=e._type?e._type:null,o=e._attributes.class,n="messages";return dg.inArray(n,o)||o.push(n),r&&!dg.inArray(r,o)&&o.push(r),"<"+t+" "+dg.attrs(e)+">"+e._message+""+t+">"},dg.theme_table=function(e){var t="";if(e._header){t+="";for(var r=0;r'+o._text+"":''+o+" "}t+=" "}if(e._rows){t+="";for(var r=0;r";for(var i=0;i"+d+""}t+=""}else if(dg.isArray(n)){t+="";for(var i=0;i"+d+""}t+=" "}}t+=" "}return t+="
"},dg.theme_title=function(e){return""+e._title+" "};
\ No newline at end of file