{"version":3,"file":"ractive.min.js","sources":["ractive.js"],"sourcesContent":["/*\n\tRactive.js v0.8.12\n\tThu Mar 16 2017 17:26:29 GMT+0000 (UTC) - commit af463e0d2dff780e82e7c2a1ea218c7350d57bd6\n\n\thttp://ractivejs.org\n\thttp://twitter.com/RactiveJS\n\n\tReleased under the MIT License.\n*/\n\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t((function() { var current = global.Ractive; var next = factory(); next.noConflict = function() { global.Ractive = current; return next; }; return global.Ractive = next; })());\n}(this, function () { 'use strict';\n\n\tvar defaults = {\n\t\t// render placement:\n\t\tel: void 0,\n\t\tappend:\t\t\t\t false,\n\n\t\t// template:\n\t\ttemplate: null,\n\n\t\t// parse:\n\t\tdelimiters: [ '{{', '}}' ],\n\t\ttripleDelimiters: [ '{{{', '}}}' ],\n\t\tstaticDelimiters: [ '[[', ']]' ],\n\t\tstaticTripleDelimiters: [ '[[[', ']]]' ],\n\t\tcsp: \t\t\t\t\ttrue,\n\t\tinterpolate: false,\n\t\tpreserveWhitespace: false,\n\t\tsanitize: false,\n\t\tstripComments: true,\n\t\tcontextLines: 0,\n\n\t\t// data & binding:\n\t\tdata: {},\n\t\tcomputed: {},\n\t\tmagic: false,\n\t\tmodifyArrays: false,\n\t\tadapt: [],\n\t\tisolated: false,\n\t\ttwoway: true,\n\t\tlazy: false,\n\n\t\t// transitions:\n\t\tnoIntro: false,\n\t\ttransitionsEnabled: true,\n\t\tcomplete: void 0,\n\n\t\t// css:\n\t\tcss: null,\n\t\tnoCssTransform: false\n\t};\n\n\t// These are a subset of the easing equations found at\n\t// https://raw.github.com/danro/easing-js - license info\n\t// follows:\n\n\t// --------------------------------------------------\n\t// easing.js v0.5.4\n\t// Generic set of easing functions with AMD support\n\t// https://github.com/danro/easing-js\n\t// This code may be freely distributed under the MIT license\n\t// http://danro.mit-license.org/\n\t// --------------------------------------------------\n\t// All functions adapted from Thomas Fuchs & Jeremy Kahn\n\t// Easing Equations (c) 2003 Robert Penner, BSD license\n\t// https://raw.github.com/danro/easing-js/master/LICENSE\n\t// --------------------------------------------------\n\n\t// In that library, the functions named easeIn, easeOut, and\n\t// easeInOut below are named easeInCubic, easeOutCubic, and\n\t// (you guessed it) easeInOutCubic.\n\t//\n\t// You can add additional easing functions to this list, and they\n\t// will be globally available.\n\n\n\tvar easing = {\n\t\tlinear: function ( pos ) { return pos; },\n\t\teaseIn: function ( pos ) { return Math.pow( pos, 3 ); },\n\t\teaseOut: function ( pos ) { return ( Math.pow( ( pos - 1 ), 3 ) + 1 ); },\n\t\teaseInOut: function ( pos ) {\n\t\t\tif ( ( pos /= 0.5 ) < 1 ) { return ( 0.5 * Math.pow( pos, 3 ) ); }\n\t\t\treturn ( 0.5 * ( Math.pow( ( pos - 2 ), 3 ) + 2 ) );\n\t\t}\n\t};\n\n\tvar legacy = null;\n\n\t/*global console, navigator */\n\n\tvar win = typeof window !== 'undefined' ? window : null;\n\tvar doc = win ? document : null;\n\n\tvar isClient = !!doc;\n\tvar isJsdom = ( typeof navigator !== 'undefined' && /jsDom/.test( navigator.appName ) );\n\tvar hasConsole = ( typeof console !== 'undefined' && typeof console.warn === 'function' && typeof console.warn.apply === 'function' );\n\n\tvar magicSupported;\n\ttry {\n\t\tObject.defineProperty({}, 'test', { value: 0 });\n\t\tmagicSupported = true;\n\t} catch ( e ) {\n\t\tmagicSupported = false;\n\t}\n\n\tvar svg = doc ?\n\t\tdoc.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1' ) :\n\t\tfalse;\n\n\tvar vendors = [ 'o', 'ms', 'moz', 'webkit' ];\n\n\tvar html = 'http://www.w3.org/1999/xhtml';\n\tvar mathml = 'http://www.w3.org/1998/Math/MathML';\n\tvar svg$1 = 'http://www.w3.org/2000/svg';\n\tvar xlink = 'http://www.w3.org/1999/xlink';\n\tvar xml = 'http://www.w3.org/XML/1998/namespace';\n\tvar xmlns = 'http://www.w3.org/2000/xmlns';\n\n\tvar namespaces = { html: html, mathml: mathml, svg: svg$1, xlink: xlink, xml: xml, xmlns: xmlns };\n\n\tvar createElement;\n\tvar matches;\n\tvar div;\n\tvar methodNames;\n\tvar unprefixed;\n\tvar prefixed;\n\tvar i;\n\tvar j;\n\tvar makeFunction;\n\t// Test for SVG support\n\tif ( !svg ) {\n\t\tcreateElement = function ( type, ns, extend ) {\n\t\t\tif ( ns && ns !== html ) {\n\t\t\t\tthrow 'This browser does not support namespaces other than http://www.w3.org/1999/xhtml. The most likely cause of this error is that you\\'re trying to render SVG in an older browser. See http://docs.ractivejs.org/latest/svg-and-older-browsers for more information';\n\t\t\t}\n\n\t\t\treturn extend ?\n\t\t\t\tdoc.createElement( type, extend ) :\n\t\t\t\tdoc.createElement( type );\n\t\t};\n\t} else {\n\t\tcreateElement = function ( type, ns, extend ) {\n\t\t\tif ( !ns || ns === html ) {\n\t\t\t\treturn extend ?\n\t\t\t\t\tdoc.createElement( type, extend ) :\n\t\t\t\t\tdoc.createElement( type );\n\t\t\t}\n\n\t\t\treturn extend ?\n\t\t\t\tdoc.createElementNS( ns, type, extend ) :\n\t\t\t\tdoc.createElementNS( ns, type );\n\t\t};\n\t}\n\n\tfunction createDocumentFragment () {\n\t\treturn doc.createDocumentFragment();\n\t}\n\n\tfunction getElement ( input ) {\n\t\tvar output;\n\n\t\tif ( !input || typeof input === 'boolean' ) { return; }\n\n\t\tif ( !win || !doc || !input ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We already have a DOM node - no work to do. (Duck typing alert!)\n\t\tif ( input.nodeType ) {\n\t\t\treturn input;\n\t\t}\n\n\t\t// Get node from string\n\t\tif ( typeof input === 'string' ) {\n\t\t\t// try ID first\n\t\t\toutput = doc.getElementById( input );\n\n\t\t\t// then as selector, if possible\n\t\t\tif ( !output && doc.querySelector ) {\n\t\t\t\toutput = doc.querySelector( input );\n\t\t\t}\n\n\t\t\t// did it work?\n\t\t\tif ( output && output.nodeType ) {\n\t\t\t\treturn output;\n\t\t\t}\n\t\t}\n\n\t\t// If we've been given a collection (jQuery, Zepto etc), extract the first item\n\t\tif ( input[0] && input[0].nodeType ) {\n\t\t\treturn input[0];\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( !isClient ) {\n\t\tmatches = null;\n\t} else {\n\t\tdiv = createElement( 'div' );\n\t\tmethodNames = [ 'matches', 'matchesSelector' ];\n\n\t\tmakeFunction = function ( methodName ) {\n\t\t\treturn function ( node, selector ) {\n\t\t\t\treturn node[ methodName ]( selector );\n\t\t\t};\n\t\t};\n\n\t\ti = methodNames.length;\n\n\t\twhile ( i-- && !matches ) {\n\t\t\tunprefixed = methodNames[i];\n\n\t\t\tif ( div[ unprefixed ] ) {\n\t\t\t\tmatches = makeFunction( unprefixed );\n\t\t\t} else {\n\t\t\t\tj = vendors.length;\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\tprefixed = vendors[i] + unprefixed.substr( 0, 1 ).toUpperCase() + unprefixed.substring( 1 );\n\n\t\t\t\t\tif ( div[ prefixed ] ) {\n\t\t\t\t\t\tmatches = makeFunction( prefixed );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// IE8...\n\t\tif ( !matches ) {\n\t\t\tmatches = function ( node, selector ) {\n\t\t\t\tvar nodes, parentNode, i;\n\n\t\t\t\tparentNode = node.parentNode;\n\n\t\t\t\tif ( !parentNode ) {\n\t\t\t\t\t// empty dummy