/*************************************************************************
Copyright (c) 2011. Adobe Systems Incorporated. All rights reserved.

You may distribute this file in source code or object code, solely in
unmodified form, and in all cases only as incorporated into your own
application created with the Adobe software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

**************************************************************************/
/*************************************************************************
AdobePatentID="B1316"
AdobePatentID="B1318"
edge.authoring.0.0.1.min.js - version 0.1.1
**************************************************************************/
(function (j, h) {
    var n = h.triggerDict = { element: function (b, d, a) { b && j(d).bind(a, b) }, timeline: function (b, d, a) { if (b && d) { var c = this.getTimelineData(d), e = c.toState, c = c.fromState; if (!this.tlProxy) this.tlProxy = {}; this.tlProxy[a] = b; this._getTimeline(d, e, c).addObserver(this.tlProxy) } } }, o = h.Symbol = function (b, d) {
        h.Notifier.call(this); this.widgetEventPrefix = "edgeSym_"; this.element = null; this.options = { data: null, initialState: null }; this.states = {}; this.timelines = {}; this.timelineCache = {}; this.timelineStateMap = {}; this.defaultBaseState =
"Base State"; this.baseState = null; this._init(b, d)
    }; h.symbol = o; var s = h.PropertyTween, r = s.substituteParameters; o._substituteParameters = r; var m, p = h.symbolDefns = {}; h.baseDataName = "edgeBaseData"; j.extend(o.prototype, h.Notifier.prototype, { constructor: o, _init: function (b, d) {
        if (d && (j.extend(this.options, d), j.isArray(d.observers) && d.observers.length)) for (var a = d.observers.length, c = 0; c < a; c++) this.addObserver(d.observers[c]); if (!this.options.data) return null; this.element = b; c = this._createEvent(); this.notifyObservers("onPreSymbolInit",
c); a = this._createEvent(); if (c.performDefaultAction) {
            c = j(b); c.data("edgeSymbol", this); if (!c.get(0).id) c.get(0).id = o._makeUniqueID(); var e = this.options.data; this.parameterValues = this._makeDefaultParameters(); j.extend(this.parameterValues, this.options.parameters); e.content && this._injectMarkup(); e.actions && this._addActionsFromData(e.actions); e.timelines && this._createTimelineSetFromData(e.timelines, e.states); e.bindings && e.bindings.length && this._addBindingsFromData(e.bindings); var f = c[0].nodeName == "BODY";
            e.content && e.content.dom && !f && (e = c.css("position"), e != "absolute" && e != "relative" && c.css("position", "relative")); this._goToInitialState(); if (b[0].style && (typeof b[0].style.webkitTransform == "undefined" || b[0].style.webkitTransform === "" || b[0].style.webkitTransform == "none")) b[0].style.webkitTransform = "translateZ(0)"; this.notifyObservers("onPostSymbolInit", a); return this
        } else this.notifyObservers("onPostSymbolInit", a)
    }, _createEvent: function (b) {
        var d = { Symbol: this, element: this.element, performDefaultAction: !0 };
        j.extend(d, b); return d
    }, _makeDefaultParameters: function () { var b = {}, d = this.options.data.parameters; if (d) for (var a in d) if (d.hasOwnProperty(a)) b[a] = d[a].defaultValue; j.extend(b, this._getSymbolParams()); return b }, _injectMarkup: function (b) {
        var d = b, a = this._createEvent({ markup: d }); this.notifyObservers("onPreInjectMarkup", a); d = a.markup; b = this._createEvent({ markup: d }); if (a.performDefaultAction) {
            var c, a = this.parameterValues; c = this.options.data.content; if (!d && c) if (c.ref) d = "", j(c.ref).each(function (a, c) {
                d +=
j(c).html()
            }); else if (c.markup) d = c.markup; else if (c.dom) { var e = h.DeclareMarkup; if (e) { var f = c.dom, k = c.symbolInstances; if (this.options.opts && this.options.opts.regenerateID === !0) { JSON.parse(JSON.stringify(c.dom)); k = []; c.symbolInstances && (k = JSON.parse(JSON.stringify(c.symbolInstances))); var g = f.length; for (c = 0; c < g; c++) this._reIdDOMElements(f[c], k) } e.renderDOM(f, this.element.get(0), a, this.getSymbolTypeName(), k); k && k.length > 0 && this._processNestedSymbolInstances(k) } } if (d) {
                if ((e = this._getParentSymbol()) &&
e.options.data.actors && e.options.data.actors.instance_parameters) { f = e.options.data.actors.instance_parameters; k = f.length; for (c = 0; c < k; c++) g = s.substituteParameters(f[c].selector, e._getSymbolParams()), j(g).filter(j(this.element)).length && j.extend(a, f[c].parameters) } d = r(d, a); j(d).appendTo(this.element)
            } 
        } this.notifyObservers("onPostInjectMarkup", b)
    }, _processNestedSymbolInstances: function (b) {
        if (b) for (var d = b.length, a = 0; a < d; a++) {
            console.log("sym inst id: " + b[a].id); var c = j("#" + b[a].id).get(0); c && h.convertElementToSymbolInstance(c,
b[a].symbolName)
        } 
    }, _reIdDOMElements: function (b, d) { var a = j(this.element).get(0).id, c = b.id; if (!c || c === "") c = o._makeUniqueID(); for (var a = a + "_" + c, c = d.length, e = 0; c; e++) if (d[e].id == b.id) d[e].id = a; b.id = a; objLen = b.length; for (a = 0; a < objLen; a++) this._reIdDOMElements(b[a], d) }, _getParentSymbol: function () { for (var b = j(this.element).parents(), d = b.length, a = 0; a < d; a++) { var c = o.get(b[a]); if (c) return c } return null }, _createTimelineSetFromData: function (b, d) {
        this.states = d; this.timelines = b; this.baseState = this.options.data.baseState;
        if (!this.baseState) this.baseState = "Base State"; return this
    }, _addBindingsFromData: function (b) { for (var d = b.length, a = 0; a < d; a++) { var c = b[a], e = c[0]; if (e[0] == "element") { var f = r(e[1], this._getSymbolParams()); f != e[1] && (e = h.cloneJSONObject(e), e[1] = f) } if (f = n[e[0]]) (c = this._getActionCallbackFunc(e[0], e[1], c.slice(1))) && f.apply(this, [c].concat(e.slice(1))) } }, _getActionCallbackFunc: function (b, d, a) {
        var c = this[a[0]], e = this; if (typeof c == "function") if (a.slice(1), b == "element") return function () {
            var a = Array.prototype.slice.call(arguments);
            return c.apply(e, a)
        }; else if (b == "timeline") return function () { var a = Array.prototype.slice.call(arguments), k = j.Event(b); a.splice(0, 0, k, d); return c.apply(e, a) }; return null
    }, _addActionsFromData: function (b) { j.extend(this, b) }, _getSymbolParams: function () { return { symbolSelector: "#" + j(this.element).get(0).id} }, _flushCache: function () { var b = this.timelines, d; for (d in b) b.hasOwnProperty(d) && this._dirtyTimeline(d) }, _goToInitialState: function () {
        var b = { parameters: this.parameterValues }, d = this.options.data.initialState;
        if (!d) d = this.options.data.baseState; o.useCSSAnimation || (d ? this._applyRules(this._buildStateForCache(null, d, b)) : (this.options.data.autoPlay || this.getTimelineData("Default Timeline")) && this.seek("Default Timeline", 0))
    }, _preNotify: function (b, d, a) {
        var c = {}; j.extend(c, a); a = this._createEvent({ tlName: d, tlOptions: c }); this.notifyObservers(b, a); if (a.performDefaultAction) return a.tlOptions; else c = a.tlOptions, d = { Symbol: this, timelineName: d, tlOptions: c, performDefaultAction: !0 }, b = b.replace(/onPre/, "onPost"), this.notifyObservers(b,
d)
    }, play: function (b, d) { var a = this._preNotify("onPreSymbolPlay", b, d); if (typeof a !== void 0) { if (typeof b === "string") { this._rememberBaseStateForTimeline(b); var c = { parameters: this.parameterValues }; j.extend(c, a); this.timelines && (this._seek(b, 0, c), this._play(b, c)) } this.notifyObservers("onPostSymbolPlay", this._createEvent({ timeline: b, tlOptions: a })); return this } }, playContinue: function (b, d) {
        var a = this._preNotify("onPreSymbolPlayContinue", b, d); if (typeof a !== void 0) {
            if (typeof b === "string") {
                this._rememberBaseStateForTimeline(b);
                var c = { parameters: this.parameterValues }; j.extend(c, a); this.timelines && this._play(b, c)
            } this.notifyObservers("onPostSymbolPlayContinue", this._createEvent({ timeline: b, tlOptions: a })); return this
        } 
    }, seek: function (b, d, a) {
        a = this._preNotify("onPreSymbolSeek", b, a); if (typeof a === void 0) return null; if (typeof b === "string") { this._rememberBaseStateForTimeline(b); var c = { parameters: this.parameterValues }; j.extend(c, a); this.timelines && this._seek(b, d, c) } this.notifyObservers("onPostSymbolSeek", this._createEvent({ timeline: b,
            tlOptions: a
        })); return null
    }, getSymbolTypeName: function () { for (var b = j(this.element)[0].className.split(" "), d = b.length, a = 0; a < d; a++) if (b[a].search(/^symbol_/) >= 0) return b[a].replace(/^symbol_/, ""); return null }, getParameter: function (b) { return this.parameterValues[b] }, setParameter: function (b, d) { this.parameterValues[b] = d }, destroy: function () { j(this.ele).removeData("edgeSymbol"); return this }, _addState: function (b, d) { this.states[b] = d }, _addTimelineData: function (b, d) {
        this.timelines[b] = d; if (d.fromState && d.toState) this.timelineStateMap =
{}
    }, _getTimelineFromStates: function (b, d) { if (typeof this.timelineStateMap[b + "//" + d] == "undefined") { for (var a in this.timelines) if (this.timelines.hasOwnProperty(a)) { var c = this.timelines[a]; this.timelineStateMap[c.fromState + "//" + c.toState] = a } typeof this.timelineStateMap[b + "//" + d] == "undefined" && (this.timelineStateMap[b + "//" + d] = null); return this.timelineStateMap[b + "//" + d] } }, _setTimelineData: function (b, d) {
        var a = this.timelines[b], c = this._getTimeline(b, a.toState, a.fromState), e = c.observers.slice(0); this._dirtyTimeline(b);
        if (a && a.fromState && a.toState) this.timelineStateMap = {}; this._addTimelineData(b, d); var f = e.length; if (f) { c = this._getTimeline(b, a.toState, a.fromState); for (a = 0; a < f; a++) c.addObserver(e[a]) } 
    }, _saveObservers: function (b) { var d = this.timelines[b], d = this._getTimeline(b, d.toState, d.fromState); if (!this.timelineObservers) this.timelineObservers = {}; this.timelineObservers[b] = d.observers.slice(0) }, _restoreObservers: function (b, d) {
        if (this.timelineObservers && this.timelineObservers[b]) {
            var a = this.timelineObservers[b]; if (a) {
                var c,
e = a.length; for (c = 0; c < e; c++) d.addObserver(a[c])
            } 
        } 
    }, _dirtyTimeline: function (b) { this._saveObservers(b); this.timelineCache[this._makeTimelineKey(b)] = null; this.timelineStateMap = {}; this.toStateCache = this.fromStateCache = null }, _isCacheDIrty: function (b) { return this.timelineCache[this._makeTimelineKey(b)] === null }, _getStateData: function (b) { return this.states[b] }, getTimelineData: function (b) { return this.timelines[b] }, _makeTimelineKey: function (b, d, a) {
        var c = null; if (!d || !a) c = this.getTimelineData(b); if (!d) d = c.toState;
        if (!a) a = c.fromState; return b + "-" + (d ? d : "") + "-" + (a ? a : "")
    }, _getBaseStateData: function () { if (this.baseState) return this._getStateData(this.baseState); else for (var b in this.states) if (this.states[b].baseState) return this.baseState = b, this._getStateData(this.baseState); return this._getStateData(this.defaultBaseState) }, _mergeBaseState: function (b) { var d = h.cloneJSONObject(this._getBaseStateData()), a; for (a in b) b.hasOwnProperty(a) && (d[a] || (d[a] = []), d[a] = d[a].concat(b[a])); return d }, _getTimeline: function (b, d,
a) {
        var c = this._makeTimelineKey(b, d, a); if (this.timelineCache[c]) return this.timelineCache[c]; var e = this.getTimelineData(b).timeline; if (d || a) e = h.cloneJSONObject(e); for (var f = e.length, k = {}, g = {}, i, l, j = 0; j < f; j++) l = e[j], l.tween && (i = l.tween[1], k[i] || (k[i] = []), k[i].push(l), i = l.tween[0] + ":" + l.tween[1] + ":" + l.tween[2], g[i] || (g[i] = []), g[i].push(l)); l = function (a, c) { return a.position - c.position }; for (i in g) g.hasOwnProperty(i) && g[i].sort(l); var o, m, n, p, r, s, t, u; if (d) for (o in d = this._mergeBaseState(this._getStateData(d)),
d) if (d.hasOwnProperty(i)) { j = d[o]; m = k[o]; n = j.length; for (t = 0; t < n; t++) { l = j[t]; p = l[0]; r = l[1]; s = l[2]; var q = null, v = -1, f = m.length; for (u = 0; m && u < f; u++) if (l = m[u], i = l.tween, i[0] == p && i[2] == r && (v == -1 || l.position + l.duration > v)) q = l, v = l.position + l.duration; q && q.tween.length > 4 && q.tween[4] && q.tween[4].copyToState && (q.tween[3] = s) } } d = {}; if (a) for (o in a = this._getStateData(a), a) if (a.hasOwnProperty(o)) {
            j = a[o]; m = k[o]; n = j.length; for (t = 0; t < n; t++) {
                l = j[t]; p = l[0]; r = l[1]; s = l[2]; d[p + ":" + o + ":" + r] = s; q = null; v = -1; if (m) f = m.length; for (u =
0; m && u < f; u++) if (l = m[u], i = l.tween, i[0] == p && i[2] == r && (v == -1 || l.position < v)) q = l, v = l.position; if (q && (l = q.tween.length > 4 && q.tween[4] && q.tween[4].copyFromState, q.tween.length < 4 || !q.tween[4] || typeof q.tween[4].fromValue == "undefined" || l)) q.tween[4] || (q.tween[4] = {}), q.tween[4].fromValue = s
            } 
        } if (a) for (i in g) if (g.hasOwnProperty(i) && g[i][0].position > 0 && (a = d[i], a !== void 0)) l = h.cloneJSONObject(g[i][0]), l.tween[3] = l.tween[4].fromValue = a, a = l.position, l.position = 0, l.duration = a, e.push(l); e = this._createTimelineFromData(e);
        this._restoreObservers(b, e); return this.timelineCache[c] = e
    }, _createTimelineFromData: function (b) { for (var d = jQuery.Edge.Timeline.createTimeline(), a = b.length, c = 0; c < a; c++) { var e = b[c], f = null; e.timeline ? f = o.prototype._createTimelineFromData(e.timeline) : e.tween ? f = h.Timeline.createTween.apply(null, e.tween) : e.trigger && (f = e.trigger.slice(0, 2), f.push(this), f = h.Timeline.createTrigger.apply(null, f)); f && d.add(f, e.position, e.duration, e.easing) } return d }, playReverse: function (b, d) {
        if (!(typeof b != "string" || b.length ===
0)) {
            var a = this._preNotify("onPreSymbolPlayReverse", b, d); if (typeof a !== void 0) {
                this._rememberBaseStateForTimeline(b); var c = this.getTimelineData(b).fromState, e = this.getTimelineData(b).toState, f = {}; j.extend(f, a, this.opts, { playDirection: "reverse" }, { parameters: this.parameterValues }); f.continueFromCurrentPos || this._ensureToState(b, f); if (c = this._getTimeline(b, e, c)) {
                    if (!this.tlPlayHandler) {
                        var k = this; this.tlPlayHandler = {}; this.tlPlayHandler.onComplete = function () {
                            k._ensureFromState(this.timelineName, this.opts);
                            this.tl.removeObserver(k.tlPlayHandler)
                        } 
                    } j.extend(this.tlPlayHandler, { tl: c, timelineName: b, opts: f }); c.addObserver(this.tlPlayHandler); f.continueFromCurrentPos || c.seek(c.getDuration()); c.play(f)
                } this.notifyObservers("onPostSymbolPlayReverse", this._createEvent({ timeline: b, tlOptions: a })); return this
            } 
        } 
    }, playReverseContinue: function (b, d) {
        var a = this._preNotify("onPreSymbolPlayReverseContinue", b, d); if (typeof a !== void 0) {
            this._rememberBaseStateForTimeline(b); if (typeof b === "string") {
                var c = {}; j.extend(c, a, { continueFromCurrentPos: !0 },
{ parameters: this.parameterValues }); this.playReverse(b, c)
            } this.notifyObservers("onPostSymbolPlayReverseContinue", this._createEvent({ timeline: b, tlOptions: a })); return this
        } 
    }, _buildStateForCache: function (b, d) {
        var a = {}; if (d) {
            var c = this.states[d]; if (c) {
                var e = {}, f, k, g; if (b) { var i = this.getTimelineData(b).timeline, l = i.length; for (f = 0; f < l; f++) g = i[f], g.tween && (k = r(g.tween[1], this.parameterValues), k = g.tween[0] + ":" + k + ":" + g.tween[2], e[k] || (e[k] = []), e[k].push(g)) } for (var h in c) if (h !== "prototype") {
                    e = c[h]; for (f = 0; f <
e.length; f++) if (i = e[f], k = r(h, this.parameterValues), i[0] == "style" || i[0] == "transform" || i[0] == "color") { a[k] || (a[k] = []); g = i[2]; if (i[3] && i[3].valueTemplate) if (l = s.prototype.parseTemplate.call(null, i[3].valueTemplate)) { var o = l.length, m = [], n = i[2]; j.isArray(n) || (n = [n]); for (var p = 0; p < o; p++) g = l[p], g.isPlaceholder ? m.push(n[g.value]) : m.push(g.value); g = m.join("") } else g = i[2].join(""); a[k].push({ decl: i, value: g }) } 
                } return a
            } 
        } 
    }, _ensureState: function (b, d, a) {
        var c = d + "Cache"; this[c] || (this[c] = {}); var e = null; this[c][b] ?
e = this[c][b] : (d = this.getTimelineData(b)[d], e = this._buildStateForCache(b, d, a), !this._isParameterizedActorTL(b) && !this._isParameterizedActorState(d) && (this[c][b] = e)); this._applyRules(e, a)
    }, _applyRules: function (b, d) {
        var a = this, c, e = function () {
            var b = j(this), e = {}, f = j.data(this, "edgeBaseData"); f || (a._rememberBaseState(b), f = j.data(this, "edgeBaseData")); j.extend(e, f.transformData, c); j.data(this, h.TransformTween.dataName, e); f = !1; if (d) f = d.dontForceZ; h.TransformTween.applyTransform(b, e, void 0, { dontForceZ: f });
            (e = j.data(this, "ui_visibility")) && b.css("visibility", e)
        }, f; for (f in b) if (b.hasOwnProperty(f)) { var k = b[f], g = k.length; c = null; for (var i = 0; i < g; i++) { var l = k[i].decl, z = l[1]; l[0] == "transform" ? (c || (c = {}), c[z] = k[i].value) : (l = k[i].decl, l = k[i].value, j(f).css(z, l)) } c && h.TransformTween && j(f).each(e) } 
    }, _ensureFromState: function (b, d) { this.getTimelineData(b).fromState == this.baseState && this._ensureBaseState(b); this._ensureState(b, "fromState", d) }, _ensureToState: function (b, d) {
        this.getTimelineData(b).toState == this.baseState &&
this._ensureBaseState(b); this._ensureState(b, "toState", d)
    }, _ensureBaseState: function (b) {
        if (b) for (var b = this.getTimelineData(b).timeline, d = b.length, a = function () { var a = j(this); h.TransformTween.removeData(a); var c = j.data(this, "edgeBaseData"); c ? (c.inlineValue ? a.attr("style", c.inlineValue) : a.removeAttr("style"), c.transformData && j.data(this, h.TransformTween.dataName, c.transformData), (c = j.data(this, "ui_visibility")) && a.css("visibility", c)) : alert("Attempt to restore base state without base state data!") },
c = 0; c < d; c++) { var e = b[c]; e.tween && (e = r(e.tween[1], this.parameterValues), j(e).each(a)) } 
    }, _isParameterizedActorTL: function (b) { for (var b = this.getTimelineData(b).timeline, d = b.length, a = 0; a < d; a++) { var c = b[a]; if (c.tween && typeof c.tween[1] == "string" && c.tween[1].search(/\$\{/) != -1) return !0 } return !1 }, _isParameterizedActorState: function (b) { if (!b) return !1; b = this.states[b]; if (!b) return !1; for (var d in b) if (d.search(/\$\{/) != -1) return !0; return !1 }, _isReverse: function (b) {
        return typeof b == "object" && typeof b.playDirection ==
"string" && b.playDirection == "reverse"
    }, _play: function (b, d) { var a = this.getTimelineData(b); if (a) { var c = a.toState; if (b && (a = this._getTimeline(b, c, a.fromState))) { if (c && !this._isReverse(d)) { if (!this.tlPlayHandler) { var e = this; this.tlPlayHandler = {}; this.tlPlayHandler.onComplete = function () { e._ensureToState(this.timelineName, this.opts); this.tl.removeObserver(e.tlPlayHandler) } } j.extend(this.tlPlayHandler, { tl: a, timelineName: b, opts: d }); a.addObserver(this.tlPlayHandler) } a.play(d) } } }, _seek: function (b, d, a) {
        var c =
this._isCacheDIrty(b), e = this.getTimelineData(b); if (e) { var f = e.toState, e = e.fromState; a || (a = {}); !c && a.skipFromState ? a.assumeStateUnchanged = !0 : (this._ensureFromState(b, a), a.assumeStateUnchanged = !1); c = 0; if (b && (f = this._getTimeline(b, f, e))) c = f.getDuration(), f.seek(d, a); d >= c && this._ensureToState(b, a) } 
    }, _rememberBaseStateForTimeline: function (b) { if (b && (b = this.getTimelineData(b))) for (var b = b.timeline, d = b.length, a = 0; a < d; a++) { var c = b[a]; c.tween && this._rememberBaseState(r(c.tween[1], this.parameterValues)) } }, _rememberBaseState: function (b) {
        j(b).each(function () {
            var b =
j(this), a = j.data(this, "edgeBaseData"); if (!a) a = {}, j.data(this, "edgeBaseData", a), a.inlineValue = b.attr("style"), a.transformData = h.TransformTween.prototype.buildTransformData.call(null, this)
        })
    }, compute: function (b, d, a, c, e) { var f; if (b) { var k = this.getTimelineData(b); (b = this._getTimeline(b, k.toState, k.fromState)) && (f = b.compute(d, a, c, e)) } return f }, findNext: function (b, d, a, c, e, f, k) {
        if (b) {
            var g = this.getTimelineData(b), c = c.toString(); if (b = this._getTimeline(b, g.toState, g.fromState)) {
                var i, g = b.getDuration() + 10,
c = parseFloat(c.replace(/[a-zA-Z%]+$/, "")), j = f + 10; i = b.compute(d, a, f, k); for (var h = i[e], h = parseFloat(h.replace(/[a-zA-Z%]+$/, "")), j = f; j <= g; j += 10) if ((i = b.compute(d, a, j, k)) && i.length) { f = i[e]; f = parseFloat(f.replace(/[a-zA-Z%]+$/, "")); if (c >= Math.min(h, f) && c <= Math.max(h, f)) return j; h = f } 
            } 
        } return -1
    }, remove: function () {
        var b = this._createEvent({}); this.notifyObservers("onPreRemove", b); if (b.performDefaultAction) {
            j(this.element).removeData("edgeSymbol"); if (m) for (var d = m.length; d >= 0; d--) m[d] == this && m.splice(d, 1);
            this.element = null; this.notifyObservers("onPostRemove", b)
        } 
    } 
    }); o.get = function (b) { return j(b).data("edgeSymbol") }; o.getDefaultEasing = function () { return h.TimelineObject.defaultEasing }; var x = (new Date).getTime(), y = function () { for (var b = "eid_" + x++; j("#" + b).length > 0; ) b = "eid_" + x++; return b }; o._makeUniqueID = y; h.setSymbolClassName = function (b, d) { j(b).attr("class", "symbol_" + d) }; var w; h.initialize = function (b, d, a) {
        if (!window.edge_authoring_mode || a || window.edge_remote_authoring) {
            if (typeof m == "undefined") m = h.symbolInstances =
[]; j.extend(p, b); w(p); var b = m, c; for (c in p) if (p.hasOwnProperty(c)) { var a = [], a = ".symbol_" + c, a = d ? j(d).find("*").andSelf().filter(a) : j(a), e = a.size(), f; for (f = 0; a && f < e; f++) { var k = new o(j(a.get(f)), { data: p[c] }); m.push(k); if (c == "stage") h.stage = k } } if (b.length === 0 || !h.stage) h.stage = new o(j("body"), { data: p.stage }), m.push(h.stage); window.runtimeReady && window.runtimeReady()
        } 
    }; h.convertElementToSymbolInstance = function (b, d) {
        if (b && j(b) && m && p[d]) {
            h.setSymbolClassName(b, d); var a = new o(j(b), { data: p[d], opts: { regenerateID: !0} });
            m.push(a)
        } 
    }; h.getSymbolInstances = function (b) { var d = []; if (!m) return d; for (var a = m.length, c = 0; c < a; c++) for (var e in b) b.hasOwnProperty(e) && m[c].getSymbolTypeName() == e && d.push(m[c]); return d }; h.removeSymbolInstance = function (b) { m && (b = o.get(b)) && b.remove() }; w = function (b) { for (var d in b) if (b.hasOwnProperty(d) && b[d].timelines) for (var a in b[d].timelines) if (b[d].timelines.hasOwnProperty(a)) for (var c = b[d].timelines[a].timeline, e = c.length, f = 0; f < e; f++) { var k = c[f]; if (!k.id) k.id = y() } }; h.play = function (b) {
        if (!window.edge_authoring_mode ||
b) if (typeof h.autoPlay == "undefined" || h.autoPlay) for (var b = this.symbolInstances.length, d = 0; d < b; d++) { var a = m[d], c = a.options.data.autoPlay; typeof c == "string" && c != "true" ? a.play(c) : (typeof c == "undefined" || c === !0 || c == "true") && a.play("Default Timeline") } 
    }; h.logDebug = function () { }; h.logInfo = function () { }; h.logWarn = function () { }; h.logError = function () { }; h.logFatal = function () { }; j.extend(h.TimelineObject.prototype, { compute: function (b, d, a, c) {
        if (!this.dDuration) {
            var e = this.duration, f = null; this.animation && this.animation.getDuration &&
(f = this.animation.getDuration()); this.dScale = e != -1 && e !== 0 ? f / e : 1; this.dDuration = e != -1 ? e : f
        } e = this.dDuration; e = e === 0 ? 1 : e; a >= e && (a = e); a <= 0 && (a = 0); if (this.animation) return e = j.easing[this.easing](a / e, a, 0, 1, e), this.animation.compute(b, d, a * this.dScale, e, c)
    } 
    }); j.extend(h.Timeline.prototype, { compute: function (b, d, a, c) {
        for (var e = this.objects, f = e.length, k = [], g = { obj: null, end: 0 }, i = { obj: null, start: this.getDuration() }, l = 0; l < f; l++) {
            var h = e[l]; if (!h.animation.isTrigger && d == h.animation.property && b == h.animation.elements) if (a >=
h.position && a <= h.position + h.duration) { if (h = h.compute(b, d, a - h.position, c)) j.isArray(h) || (h = [h]), k = h } else if (a < h.position) { if (h.position <= i.start) i.start = h.position, i.obj = h } else if (a > h.position + h.duration && h.position + h.duration >= g.end) g.end = h.position, g.obj = h
        } if (!k || j.isArray(k) && k.length === 0) if (g.obj && g.obj.animation.toValue) k = g.obj.animation.toValue; else if (i.obj && i.obj.animation.fromValue) k = i.obj.animation.fromValue; j.isArray(k) || (k = [k]); return k
    } 
    }); j.extend(s.prototype, { compute: function (b, d, a, c) {
        a =
this.property; if (b != this.elements || d != a) return null; for (var b = this.fromValues, d = this.toValues, a = this.filter, e = b.length, f = [], k = 0; k < e; k++) { var g = b[k], i = d[k]; g += (i.value - g) * c; a && a[k] && (g = a[k](g)); f.push(g + i.unit) } return f
    } 
    }); j.extend(h.TransformTween.prototype, { compute: s.prototype.compute })
})(jQuery, jQuery.Edge); (function (j, h) {
    if (typeof h.DeclareMarkup == "undefined") {
        var n = function () {
            function j(a, c, b, d, k) {
                var g = document.createElement(a); g.id = c; g.style.position = "absolute"; $(g).css("left", b.rect[0] + "px"); $(g).css("top", b.rect[1] + "px"); b.rect[2] > 0 && $(g).css("width", b.rect[2] + "px"); b.rect[3] > 0 && $(g).css("height", b.rect[3] + "px"); b.overflow && ($(g).css("overflow", b.overflow), (b.overflow == "hidden" || b.overflow == "scroll") && $(g).css("text-overflow", "clip")); b.br && (b.br.length == 1 ? $(g).css("border-radius", b.br[0] + "px") :
($(g).css("border-top-left-radius", b.br[0]), $(g).css("border-top-right-radius", b.br[1]), $(g).css("border-bottom-right-radius", b.br[2]), $(g).css("border-bottom-left-radius", b.br[3]))); if (b.tf) {
                    for (var c = [], i = [[3, 0], [3, 0], [2, 0], [3, 1], [2, "50%"]], h = 0; h < i.length; h++) { c[h] = []; b.tf[h] || (b.tf[h] = []); for (var m = 0; m < i[h][0]; m++) b.tf[h][m] || (b.tf[h][m] = i[h][1]), c[h][m] = b.tf[h][m] } i = typeof c[4][0] == "string" ? c[4][0] + " " + c[4][1] : c[4][0] + "px " + c[4][1] + "px"; $(g).css("-webkit-transform-origin", i); $(g).css("-moz-transform-origin",
i); $(g).css("-ms-transform-origin", i); $(g).css("-o-transform-origin", i); "webkitAppearance" in document.documentElement.style ? $(g).css("-webkit-transform", "translate3d(" + c[0][0] + "px," + c[0][1] + "px," + c[0][2] + "px) rotateZ(" + c[1][0] + "deg) rotateX(" + c[1][1] + "deg) rotateY(" + c[1][2] + "deg) skew(" + c[2][0] + "deg," + c[2][1] + "deg) scale3d(" + c[3][0] + "," + c[3][1] + "," + c[3][2] + ")") : (i = "translate(" + c[0][0] + "px," + c[0][1] + "px) rotate(" + c[1][0] + "deg)  skewX(" + c[2][0] + "deg) skewY(" + c[2][1] + "deg) scale(" + c[3][0] + "," + b.tf[3][1] +
")", $(g).css("-moz-transform", i), $(g).css("-ms-transform", i), $(g).css("-o-transform", i))
                } else g.style.webkitTransform = "translateZ(0)"; b.opacity && $(g).css("opacity", b.opacity); b.stroke && ((c = b.stroke[0]) || (c = 0), (i = b.stroke[1]) ? typeof i == "string" && (i = [i]) : i = ["rgba(0,0,0,0)"], (h = b.stroke[2]) || (h = "none"), $(g).css("border", "" + c + "px " + h + " " + i[0])); if (b.fill && (c = b.fill[0], typeof c == "string" && (c = [c]), (i = b.fill[1]) || (i = "solid"), i == "solid" && c && $(g).css("background-color", c[0]), b.fill[1])) {
                    c = b.fill[1]; typeof c ==
"string" ? c = [c] : typeof c == "object" && ((i = c[window.EdgeScreenProfile.name]) || (i = c["default"]), c = i); if (c[0] && ($(g).css("background-image", "url(" + c[0] + ")"), c[1] || c[2])) c[1] || (c[1] = "0px"), c[2] || (c[2] = "0px"), $(g).css("background-position", c[1] + " " + c[2]); c[3] || $(g).css("background-repeat", "no-repeat"); c[4] && c[4] != "scroll" && $(g).css("background-attachment", c[4])
                } b.source && (g.setAttribute("src", b.source), a == "video" && g.setAttribute("controls", "controls"), a == "audio" && g.setAttribute("autoplay", "autoplay")); if (d) {
                    if (!d.appendChild) return g;
                    d.firstChild && k >= 0 && d.children && k < d.children.length ? d.insertBefore(g, d.children[k]) : d.appendChild(g)
                } return g
            } function h(a, c, e, f, k) {
                var l; w(c, f); var g = null; e && e.nodeName && e.nodeName.toLowerCase() == "canvas" && (l = g = n.stageLookup[e.id], e = l); var i = null; switch (c.t) {
                    case "def": break; case "rect": case "elipse": case "image": case "group": i = j("div", a, c, e, k); break; case "video": i = j("video", a, c, e, k); break; case "audio": i = j("audio", a, c, e, k); break; case "text": i = j("div", a, c, e, k); c.font && (c.font[0] && c.font[0] !== "" &&
$(i).css("font-family", c.font[0]), typeof c.font[1] != "object" && (c.font[1] = [c.font[1]]), c.font[1][1] || (c.font[1][1] = "px"), c.font[1][0] && c.font[1][0] !== "" && $(i).css("font-size", c.font[1][0] + c.font[1][1]), c.font[2] && c.font[2] !== "" && $(i).css("color", c.font[2]), c.font[3] && c.font[3] !== "" && $(i).css("font-weight", c.font[3]), c.font[4] && c.font[4] !== "" && $(i).css("text-decoration", c.font[4]), c.font[5] && c.font[5] !== "" && $(i).css("font-style", c.font[5])); c.align && $(i).css("text-align", c.align); if (c.position) i.style.position =
c.position; i.appendChild(document.createTextNode(c.text)); break; case "canvas": i = j("canvas", a, c, e, k); g = { def: c, params: f, stage: new b(i), children: {} }; g.obj = g.stage; g.obj.width = c.rect[2]; g.obj.height = c.rect[3]; n.stageLookup[a] = g; break; case "line": break; case "shape": if (!e) break; a = { def: c, params: f, obj: new d, stage: e.stage, children: {} }; a.obj.x = c.rect[0]; a.obj.y = c.rect[1]; a.obj.width = c.rect[2]; a.obj.height = c.rect[3]; e.children[c.id] = a; e.obj.addChild(a.obj); i = a; break; default: alert("unhandled type == " + c.t)
                } return i
            }
            function r(a, c, b, d, k) { if (b = h(a, c, d, k, 0)) { n.nodeSymbolInstanceLookup[a] && $.Edge.setSymbolClassName(b, n.nodeSymbolInstanceLookup[a]); n.DOMNodeStarted(b, d, c); if (c.c) for (a = 0; a < c.c.length; a++) d = c.c[a], r(d.id, d, c, b, k); n.DOMNodeCompleted(b) } return b } function m(a, b) {
                var d = a, f; if (a.base) { if (typeof a.base == "string") a.base = [a.base]; if (a.base.length > 0) { d = {}; for (f = 0; f < a.base.length; f++) { var h = n.nodeLookup[a.base[f]]; h && $.extend(!0, d, h) } $.extend(!0, d, a) } } d.base = null; for (f = 0; d.c && f < d.c.length; f++) d.c[f] = m(d.c[f],
b); return d
            } function p(a, b) { w(a, b); if (!a.id || a.id === "") alert("elements without ids are not yet supported"); else { n.nodeLookup[a.id] = a; for (var d = 0; a.children && d < a.children.length; d++) p(a.children[d]) } } function x(a, b) { if (!a) return b; if (typeof b == "string") { var d = b.search(/\$\{/); if (d >= 0) { var f = b.search(/\}/); if (f > d) return d = b.slice(d + 2, f), a[d] } } return b } function y(a, b) {
                var d = a.obj.graphics, f = a.params; d.clear(); var h = "rgba(0,0,0,0)"; a.def.fill && typeof a.def.fill == "object" && (h = a.def.fill[0]); d.beginFill(h).drawRect(0,
0, x(f, a.def.rect[2]), x(f, a.def.rect[3])); for (var g in a.children) a.children.hasOwnProperty(g) && y(b.children[g])
            } var w, b, d; w = function (a, b) {
                if (a.type) a.t = a.type; if (a.t) a.t = a.t.toLowerCase(); a.type = a.t; a.children ? a.c = a.children : a.children = a.c; a.rect ? a.r = a.rect : a.rect = a.r; if (!a.rect) a.rect = []; for (; a.rect.length < 4; ) a.rect[a.rect.length] = 0; a.borderRadius ? a.br = a.borderRadius : a.borderRadius = a.br; a.shape ? a.sh = a.shape : a.shape = a.sh; a.transform ? a.tf = a.transform : a.transform = a.tf; if (a.tf) {
                    for (; a.tf.length < 5; ) a.tf[a.tf.length] =
0; for (; a.transform.length < 8; ) a.tf[a.tf.length] = 1
                } a.opacity ? a.o = a.opacity : a.opacity = a.o; if (a.stroke) a.s = a.stroke; a.stroke = a.s; if (a.fill) a.f = a.fill; if (a.f && b) { var d = b[a.f]; if (d) a.f = d } a.fill = a.f
            }; return { stageLookup: {}, nodeLookup: {}, nodeSymbolInstanceLookup: {}, DOMNodeSeek: function () { }, DOMNodeReset: function () { }, DOMNodeStarted: function () { }, DOMNodeCompleted: function () { }, renderDOM: function (a, b, d, f, h) {
                window.EdgeScreenProfile = { name: "detected", dim: [screen.width, screen.height] }; n.nodeLookup = {}; var g; for (g = 0; g <
a.length; g++) p(a[g], d); for (g = 0; g < a.length; g++) a[g] = m(a[g], d); n.nodeSymbolInstanceLookup = {}; if (h) for (g = 0; g < h.length; g++) n.nodeSymbolInstanceLookup[h[g].id] = h[g].symbolName; n.DOMNodeSeek(b, f); for (g = 0; g < a.length; g++) f = a[g], (f = r(f.id, f, null, null, d)) && b.appendChild(f); n.DOMNodeReset()
            }, drawSceneGraph: function () { for (var a in n.stageLookup) if (n.stageLookup.hasOwnProperty(a)) { var b = n.stageLookup[a], d; for (d in b.children) b.children.hasOwnProperty(d) && y(b.children[d], b); b.stage.update() } }, createElement: h
            }
        } ();
        h.DeclareMarkup = n
    } 
})(jQuery, jQuery.Edge);

