From 1bef33a4830cac13d7ca757fe4b6d059c965310a Mon Sep 17 00:00:00 2001 From: jacobawenger Date: Mon, 12 May 2014 18:53:43 -0700 Subject: [PATCH] Adding bower_components to version control for todo app example We are using the todo app example as the ReactJS example for `firebase bootstrap` on the CLI and we want it to work out of the box. So we need to check in bower_components to make that work. --- .gitignore | 4 +- .../bower_components/ReactFire/.bower.json | 33 + .../bower_components/ReactFire/CHANGELOG.md | 24 + .../bower_components/ReactFire/LICENSE | 21 + .../bower_components/ReactFire/README.md | 67 + .../bower_components/ReactFire/bower.json | 24 + .../bower_components/ReactFire/gulpfile.js | 16 + .../ReactFire/js/ReactFireMixin.js | 86 + .../ReactFire/js/ReactFireMixin.min.js | 1 + .../bower_components/ReactFire/package.json | 30 + .../bower_components/firebase/.bower.json | 34 + .../todoApp/bower_components/firebase/LICENSE | 19 + .../bower_components/firebase/README.md | 4 + .../bower_components/firebase/bower.json | 25 + .../firebase/firebase-debug.js | 8666 +++++++ .../bower_components/firebase/firebase.js | 150 + .../bower_components/react/.bower.json | 15 + .../bower_components/react/JSXTransformer.js | 12569 ++++++++++ .../todoApp/bower_components/react/bower.json | 5 + .../react/react-with-addons.js | 18884 ++++++++++++++++ .../react/react-with-addons.min.js | 21 + .../todoApp/bower_components/react/react.js | 17228 ++++++++++++++ .../bower_components/react/react.min.js | 21 + 23 files changed, 57945 insertions(+), 2 deletions(-) create mode 100644 examples/todoApp/bower_components/ReactFire/.bower.json create mode 100644 examples/todoApp/bower_components/ReactFire/CHANGELOG.md create mode 100644 examples/todoApp/bower_components/ReactFire/LICENSE create mode 100644 examples/todoApp/bower_components/ReactFire/README.md create mode 100644 examples/todoApp/bower_components/ReactFire/bower.json create mode 100644 examples/todoApp/bower_components/ReactFire/gulpfile.js create mode 100644 examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.js create mode 100644 examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.min.js create mode 100644 examples/todoApp/bower_components/ReactFire/package.json create mode 100644 examples/todoApp/bower_components/firebase/.bower.json create mode 100644 examples/todoApp/bower_components/firebase/LICENSE create mode 100644 examples/todoApp/bower_components/firebase/README.md create mode 100644 examples/todoApp/bower_components/firebase/bower.json create mode 100644 examples/todoApp/bower_components/firebase/firebase-debug.js create mode 100644 examples/todoApp/bower_components/firebase/firebase.js create mode 100644 examples/todoApp/bower_components/react/.bower.json create mode 100644 examples/todoApp/bower_components/react/JSXTransformer.js create mode 100644 examples/todoApp/bower_components/react/bower.json create mode 100644 examples/todoApp/bower_components/react/react-with-addons.js create mode 100644 examples/todoApp/bower_components/react/react-with-addons.min.js create mode 100644 examples/todoApp/bower_components/react/react.js create mode 100644 examples/todoApp/bower_components/react/react.min.js diff --git a/.gitignore b/.gitignore index 95a85e0..b9ef661 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules -bower_components -firebase.json \ No newline at end of file +./bower_components +firebase.json diff --git a/examples/todoApp/bower_components/ReactFire/.bower.json b/examples/todoApp/bower_components/ReactFire/.bower.json new file mode 100644 index 0000000..64f9123 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/.bower.json @@ -0,0 +1,33 @@ +{ + "name": "ReactFire", + "version": "0.1.3", + "homepage": "https://github.com/firebase/ReactFire", + "authors": [ + "jacobawenger " + ], + "description": "Firebase mixin for ReactJS", + "main": "js/ReactFireMixin.min.js", + "keywords": [ + "react", + "firebase" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "./CHANGELOG.md", + "./gulpfile.js", + "./package.json", + "examples", + "node_modules", + "bower_components" + ], + "_release": "0.1.3", + "_resolution": { + "type": "version", + "tag": "v0.1.3", + "commit": "c5c602bfbc556b01abbf2fd686c1748bd4d9e18c" + }, + "_source": "git://github.com/firebase/ReactFire.git", + "_target": "~0.1.3", + "_originalSource": "ReactFire" +} \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/CHANGELOG.md b/examples/todoApp/bower_components/ReactFire/CHANGELOG.md new file mode 100644 index 0000000..84e33e3 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/CHANGELOG.md @@ -0,0 +1,24 @@ +v0.1.3 +------------- +Release Date: 2014-05-02 + + * Bug fix for misnamed variable in _toArray() method (submitted by @danielmahal) + * Added gulp integration to lint, minify, and test code + +v0.1.2 +------------- +Release Date: 2014-05-02 + + * Fixed typo in bower.json + +v0.1.1 +------------- +Release Date: 2014-05-02 + + * Better implementation of _isArray() and _toArray() helpers + +v0.1.0 +------------- +Release Date: 2014-04-30 + + * First stable release of the ReactFireMixin \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/LICENSE b/examples/todoApp/bower_components/ReactFire/LICENSE new file mode 100644 index 0000000..3bd8048 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Firebase + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/README.md b/examples/todoApp/bower_components/ReactFire/README.md new file mode 100644 index 0000000..40ac699 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/README.md @@ -0,0 +1,67 @@ +# ReactFire + +ReactFireMixin is an officially supported [ReactJS](http://facebook.github.io/react/) mixin +for [Firebase](http://www.firebase.com/). Firebase provides your React app with a +persistent, realtime backend to effortlessly keep all of your clients in sync! + +Read our [blog post](https://firebase.com/blog/2014-05-01-using-firebase-with-react.html) on using Firebase with React and check out our [live Todo app demo](https://reactfiretodoapp.firebaseapp.com/) to get started! + +## Usage + +The ReactFireMixin can be added to you project in two ways: + +* Manually copy ReactFireMixin.js from GitHub to you local directory. +* Use bower: `bower install ReactFire` + +To use the ReactFireMixin in a React component, add it to the component's mixins property: + + var ExampleComponent = React.createClass({ + mixins: [ReactFireMixin], + ... + }); + +## API Reference + +###bindAsArray(firebaseRef, bindVar) + +Creates a binding between Firebase and the inputted bind variable as an array. The Firebase +reference will be stored in this.firebaseRefs[bindVar]. + + this.bindAsArray(new Firebase("https:///"), "items"); + +###bindAsObject(firebaseRef, bindVar) + +Creates a binding between Firebase and the inputted bind variable as an object. The Firebase +reference will be stored in this.firebaseRefs[bindVar]. + + this.bindAsObject(new Firebase("https:///"), "items"); + +###unbind(bindVar) + +Removes the binding between Firebase and the inputted bind variable. This removes the stored +Firebase reference in this.firebaseRefs[bindVar] and cleans up any event handlers associated +with that Firebase reference. + + this.unbind("items"); + +## Contributing + +Interested in manually debugging from source or submitting a pull request? Follow the steps +below. + +### Install Dependencies + +```bash +$ git clone https://github.com/firebase/ReactFire.git # clone this repository +$ npm install # install local NPM build / test dependencies +``` + +### Compile + +```bash +$ gulp +``` + +## License + +[Firebase MIT License](http://firebase.mit-license.org) \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/bower.json b/examples/todoApp/bower_components/ReactFire/bower.json new file mode 100644 index 0000000..ab99fad --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/bower.json @@ -0,0 +1,24 @@ +{ + "name": "ReactFire", + "version": "0.1.3", + "homepage": "https://github.com/firebase/ReactFire", + "authors": [ + "jacobawenger " + ], + "description": "Firebase mixin for ReactJS", + "main": "js/ReactFireMixin.min.js", + "keywords": [ + "react", + "firebase" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "./CHANGELOG.md", + "./gulpfile.js", + "./package.json", + "examples", + "node_modules", + "bower_components" + ] +} diff --git a/examples/todoApp/bower_components/ReactFire/gulpfile.js b/examples/todoApp/bower_components/ReactFire/gulpfile.js new file mode 100644 index 0000000..6a1c762 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/gulpfile.js @@ -0,0 +1,16 @@ +var gulp = require("gulp"); +var jshint = require("gulp-jshint"); +var uglify = require("gulp-uglify"); +var extReplace = require("gulp-ext-replace"); + +gulp.task("scripts", function() { + // Load the code, and process it. + var code = gulp.src("js/ReactFireMixin.js") + .pipe(jshint()) + .pipe(jshint.reporter("jshint-stylish")) + .pipe(uglify()) + .pipe(extReplace(".min.js")) + .pipe(gulp.dest("js")); +}); + +gulp.task("default", ["scripts"]); \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.js b/examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.js new file mode 100644 index 0000000..829adb6 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.js @@ -0,0 +1,86 @@ +var ReactFireMixin; + +(function() { + "use strict"; + + ReactFireMixin = { + /********************/ + /* MIXIN LIFETIME */ + /********************/ + /* Initializes the Firebase binding refs array */ + componentWillMount: function() { + this.firebaseRefs = {}; + }, + + /* Removes any remaining Firebase bindings */ + componentWillUnmount: function() { + for (var key in this.firebaseRefs) { + if (this.firebaseRefs.hasOwnProperty(key)) { + this.unbind(key); + } + } + }, + + + /*************/ + /* BINDING */ + /*************/ + /* Creates a binding between Firebase and the inputted bind variable as an array */ + bindAsArray: function(firebaseRef, bindVar) { + this._bind(firebaseRef, bindVar, true); + }, + + /* Creates a binding between Firebase and the inputted bind variable as an object */ + bindAsObject: function(firebaseRef, bindVar) { + this._bind(firebaseRef, bindVar, false); + }, + + /* Creates a binding between Firebase and the inputted bind variable as either an array or object */ + _bind: function(firebaseRef, bindVar, bindAsArray) { + this.firebaseRefs[bindVar] = firebaseRef; + firebaseRef.on("value", function(dataSnapshot) { + var newState = {}; + if (bindAsArray) { + newState[bindVar] = this._toArray(dataSnapshot.val()); + } + else { + newState[bindVar] = dataSnapshot.val(); + } + this.setState(newState); + }.bind(this)); + }, + + /* Removes the binding between Firebase and the inputted bind variable */ + unbind: function(bindVar) { + this.firebaseRefs[bindVar].off("value"); + delete this.firebaseRefs[bindVar]; + }, + + + /*************/ + /* HELPERS */ + /*************/ + /* Returns true if the inputted object is a JavaScript array */ + _isArray: function(obj) { + return (obj && typeof obj === "object" && obj instanceof Array); + }, + + /* Converts a Firebase object to a JavaScript array */ + _toArray: function(obj) { + var out = []; + if (obj) { + if (this._isArray(obj)) { + out = obj; + } + else if (typeof(obj) === "object") { + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + out.push(obj[key]); + } + } + } + } + return out; + } + }; +})(); \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.min.js b/examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.min.js new file mode 100644 index 0000000..e6e15b9 --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/js/ReactFireMixin.min.js @@ -0,0 +1 @@ +var ReactFireMixin;!function(){"use strict";ReactFireMixin={componentWillMount:function(){this.firebaseRefs={}},componentWillUnmount:function(){for(var i in this.firebaseRefs)this.firebaseRefs.hasOwnProperty(i)&&this.unbind(i)},bindAsArray:function(i,n){this._bind(i,n,!0)},bindAsObject:function(i,n){this._bind(i,n,!1)},_bind:function(i,n,t){this.firebaseRefs[n]=i,i.on("value",function(i){var e={};e[n]=t?this._toArray(i.val()):i.val(),this.setState(e)}.bind(this))},unbind:function(i){this.firebaseRefs[i].off("value"),delete this.firebaseRefs[i]},_isArray:function(i){return i&&"object"==typeof i&&i instanceof Array},_toArray:function(i){var n=[];if(i)if(this._isArray(i))n=i;else if("object"==typeof i)for(var t in i)i.hasOwnProperty(t)&&n.push(i[t]);return n}}}(); \ No newline at end of file diff --git a/examples/todoApp/bower_components/ReactFire/package.json b/examples/todoApp/bower_components/ReactFire/package.json new file mode 100644 index 0000000..2b4a78c --- /dev/null +++ b/examples/todoApp/bower_components/ReactFire/package.json @@ -0,0 +1,30 @@ +{ + "name": "ReactFire", + "description": "Firebase mixin for ReactJS", + "main": "ReactFireMixin.js", + "repository": { + "type": "git", + "url": "https://github.com/firebase/ReactFire.git" + }, + "bugs": { + "url": "https://github.com/firebase/ReactFire/issues" + }, + "private": true, + "licenses": [ + { + "type": "MIT", + "url": "http://firebase.mit-license.org/" + } + ], + "version": "0.1.3", + "dependencies": { + "firebase": "~1.0.11" + }, + "devDependencies": { + "gulp": "^3.5.6", + "gulp-uglify": "^0.2.1", + "gulp-jshint": "^1.5.1", + "gulp-ext-replace": "0.0.5", + "jshint-stylish": "^0.2.0" + } +} diff --git a/examples/todoApp/bower_components/firebase/.bower.json b/examples/todoApp/bower_components/firebase/.bower.json new file mode 100644 index 0000000..9109620 --- /dev/null +++ b/examples/todoApp/bower_components/firebase/.bower.json @@ -0,0 +1,34 @@ +{ + "name": "firebase", + "version": "1.0.15", + "homepage": "https://firebase.com", + "authors": [ + "Firebase " + ], + "description": "Firebase Web Client", + "main": "firebase.js", + "keywords": [ + "Firebase", + "synchronization", + "real-time", + "websocket" + ], + "license": "MIT", + "private": false, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "_release": "1.0.15", + "_resolution": { + "type": "version", + "tag": "v1.0.15", + "commit": "8653041398ced2d6123ffd9b486d77e96e46cf5b" + }, + "_source": "git://github.com/firebase/firebase-bower.git", + "_target": "~1.0.12", + "_originalSource": "firebase" +} \ No newline at end of file diff --git a/examples/todoApp/bower_components/firebase/LICENSE b/examples/todoApp/bower_components/firebase/LICENSE new file mode 100644 index 0000000..6c7c4b3 --- /dev/null +++ b/examples/todoApp/bower_components/firebase/LICENSE @@ -0,0 +1,19 @@ +Copyright © 2014 Firebase + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/examples/todoApp/bower_components/firebase/README.md b/examples/todoApp/bower_components/firebase/README.md new file mode 100644 index 0000000..938470a --- /dev/null +++ b/examples/todoApp/bower_components/firebase/README.md @@ -0,0 +1,4 @@ +firebase-bower +============== + +Firebase Bower diff --git a/examples/todoApp/bower_components/firebase/bower.json b/examples/todoApp/bower_components/firebase/bower.json new file mode 100644 index 0000000..8d7e76c --- /dev/null +++ b/examples/todoApp/bower_components/firebase/bower.json @@ -0,0 +1,25 @@ +{ + "name": "firebase", + "version": "1.0.15", + "homepage": "https://firebase.com", + "authors": [ + "Firebase " + ], + "description": "Firebase Web Client", + "main": "firebase.js", + "keywords": [ + "Firebase", + "synchronization", + "real-time", + "websocket" + ], + "license": "MIT", + "private": false, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} \ No newline at end of file diff --git a/examples/todoApp/bower_components/firebase/firebase-debug.js b/examples/todoApp/bower_components/firebase/firebase-debug.js new file mode 100644 index 0000000..ed53c20 --- /dev/null +++ b/examples/todoApp/bower_components/firebase/firebase-debug.js @@ -0,0 +1,8666 @@ +var COMPILED = false; +var goog = goog || {}; +goog.global = this; +goog.DEBUG = true; +goog.LOCALE = "en"; +goog.provide = function(name) { + if(!COMPILED) { + if(goog.isProvided_(name)) { + throw Error('Namespace "' + name + '" already declared.'); + } + delete goog.implicitNamespaces_[name]; + var namespace = name; + while(namespace = namespace.substring(0, namespace.lastIndexOf("."))) { + if(goog.getObjectByName(namespace)) { + break + } + goog.implicitNamespaces_[namespace] = true + } + } + goog.exportPath_(name) +}; +goog.setTestOnly = function(opt_message) { + if(COMPILED && !goog.DEBUG) { + opt_message = opt_message || ""; + throw Error("Importing test-only code into non-debug environment" + opt_message ? ": " + opt_message : "."); + } +}; +if(!COMPILED) { + goog.isProvided_ = function(name) { + return!goog.implicitNamespaces_[name] && !!goog.getObjectByName(name) + }; + goog.implicitNamespaces_ = {} +} +goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) { + var parts = name.split("."); + var cur = opt_objectToExportTo || goog.global; + if(!(parts[0] in cur) && cur.execScript) { + cur.execScript("var " + parts[0]) + } + for(var part;parts.length && (part = parts.shift());) { + if(!parts.length && goog.isDef(opt_object)) { + cur[part] = opt_object + }else { + if(cur[part]) { + cur = cur[part] + }else { + cur = cur[part] = {} + } + } + } +}; +goog.getObjectByName = function(name, opt_obj) { + var parts = name.split("."); + var cur = opt_obj || goog.global; + for(var part;part = parts.shift();) { + if(goog.isDefAndNotNull(cur[part])) { + cur = cur[part] + }else { + return null + } + } + return cur +}; +goog.globalize = function(obj, opt_global) { + var global = opt_global || goog.global; + for(var x in obj) { + global[x] = obj[x] + } +}; +goog.addDependency = function(relPath, provides, requires) { + if(!COMPILED) { + var provide, require; + var path = relPath.replace(/\\/g, "/"); + var deps = goog.dependencies_; + for(var i = 0;provide = provides[i];i++) { + deps.nameToPath[provide] = path; + if(!(path in deps.pathToNames)) { + deps.pathToNames[path] = {} + } + deps.pathToNames[path][provide] = true + } + for(var j = 0;require = requires[j];j++) { + if(!(path in deps.requires)) { + deps.requires[path] = {} + } + deps.requires[path][require] = true + } + } +}; +goog.ENABLE_DEBUG_LOADER = true; +goog.require = function(name) { + if(!COMPILED) { + if(goog.isProvided_(name)) { + return + } + if(goog.ENABLE_DEBUG_LOADER) { + var path = goog.getPathFromDeps_(name); + if(path) { + goog.included_[path] = true; + goog.writeScripts_(); + return + } + } + var errorMessage = "goog.require could not find: " + name; + if(goog.global.console) { + goog.global.console["error"](errorMessage) + } + throw Error(errorMessage); + } +}; +goog.basePath = ""; +goog.global.CLOSURE_BASE_PATH; +goog.global.CLOSURE_NO_DEPS; +goog.global.CLOSURE_IMPORT_SCRIPT; +goog.nullFunction = function() { +}; +goog.identityFunction = function(opt_returnValue, var_args) { + return opt_returnValue +}; +goog.abstractMethod = function() { + throw Error("unimplemented abstract method"); +}; +goog.addSingletonGetter = function(ctor) { + ctor.getInstance = function() { + if(ctor.instance_) { + return ctor.instance_ + } + if(goog.DEBUG) { + goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor + } + return ctor.instance_ = new ctor + } +}; +goog.instantiatedSingletons_ = []; +if(!COMPILED && goog.ENABLE_DEBUG_LOADER) { + goog.included_ = {}; + goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}; + goog.inHtmlDocument_ = function() { + var doc = goog.global.document; + return typeof doc != "undefined" && "write" in doc + }; + goog.findBasePath_ = function() { + if(goog.global.CLOSURE_BASE_PATH) { + goog.basePath = goog.global.CLOSURE_BASE_PATH; + return + }else { + if(!goog.inHtmlDocument_()) { + return + } + } + var doc = goog.global.document; + var scripts = doc.getElementsByTagName("script"); + for(var i = scripts.length - 1;i >= 0;--i) { + var src = scripts[i].src; + var qmark = src.lastIndexOf("?"); + var l = qmark == -1 ? src.length : qmark; + if(src.substr(l - 7, 7) == "base.js") { + goog.basePath = src.substr(0, l - 7); + return + } + } + }; + goog.importScript_ = function(src) { + var importScript = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_; + if(!goog.dependencies_.written[src] && importScript(src)) { + goog.dependencies_.written[src] = true + } + }; + goog.writeScriptTag_ = function(src) { + if(goog.inHtmlDocument_()) { + var doc = goog.global.document; + doc.write('