Plugin Directory

Changeset 2562876


Ignore:
Timestamp:
07/12/2021 01:38:03 PM (5 years ago)
Author:
morunas
Message:

tagging 3.2.10 - ampersand was being wrongly encoded

Location:
dot-embed
Files:
1 added
4 edited
4 copied

Legend:

Unmodified
Added
Removed
  • dot-embed/tags/3.2.10/dot-embed.php

    r2562854 r2562876  
    99as follows:
    1010<code>[dotembed url="" title="" dotext="" dotid="" pageext="" pageid="" width="" height="" ratio="" loading="" loadingcolor="" gacrossdomaintracking=""]</code>
    11 Version: 3.2.9
     11Version: 3.2.10
    1212Author: Pedro Figueiredo
    1313Author URI: http://dot.vu
     
    167167          dotExt: '<?php echo esc_attr($dotext); ?>',
    168168          pageExt: '<?php echo esc_attr($pageExt); ?>',
    169           customdomainlink: '<?php echo esc_attr($customdomainlink); ?>',
     169          customdomainlink: '<?php echo  html_entity_decode(esc_url($customdomainlink)); ?>',
    170170          height: '<?php echo esc_attr($height); ?>',
    171171          width: '<?php echo esc_attr($width); ?>',
  • dot-embed/tags/3.2.10/js/dot-embed.min.js

    r2280109 r2562876  
    1 /**
    2  * dot-embed.js
    3  * A lightweight library for embedding interactive content
    4  * from https://dot.vu. It includes loading animation capability,
    5  * automatic height adjustment due to internal content varying in size.
    6  * It also includes gtm cross-domain tracking support.
    7  *
    8  * @version 2.7
    9  * @author  Pedro Figueiredo
    10  * @updated 2019-06-06
    11  * @link    https://dot.vu
    12  *
    13  * Copyright 2018 dot.vu
    14  *
    15  * Permission is hereby granted, free of charge, to any person obtaining
    16  * a copy of this software and associated documentation files (the "Software"),
    17  * to deal in the Software without restriction, including without limitation the
    18  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    19  * copies of the Software, and to permit persons to whom the Software is furnished
    20  * to do so, subject to the following conditions:
    21  *
    22  * The above copyright notice and this permission notice shall be included in
    23  * all copies or substantial portions of the Software.
    24  *
    25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    26  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
    27  * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    28  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
    29  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
    30  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     1/*!
     2 *
     3 *   @dotvu/dot-embed v3.0.1
     4 *
     5 *   A lightweight library for embedding interactive content
     6 *   from https://dot.vu. It includes loading animation capability,
     7 *   automatic height adjustment due to internal content varying in size.
     8 *   It also includes gtm cross-domain tracking support.
     9 *
     10 *   Copyright (c) Dot.vu
     11 *
     12 *   Permission is hereby granted, free of charge, to any person obtaining
     13 *   a copy of this software and associated documentation files (the "Software"),
     14 *   to deal in the Software without restriction, including without limitation the
     15 *   rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     16 *   copies of the Software, and to permit persons to whom the Software is furnished
     17 *   to do so, subject to the following conditions:
     18 *
     19 *   The above copyright notice and this permission notice shall be included in
     20 *   all copies or substantial portions of the Software.
     21 *
     22 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
     23 *   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
     24 *   PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
     25 *   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     26 *   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
     27 *   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     28 *   
    3129 */
    32 window.dotEmbedConfig=window.dotEmbedConfig||{},window.dotEmbed=window.dotEmbed||{},function(e,t){if(window.dotEmbedConfig.iframeFix&&window.sessionStorage){var n=!1;try{n=null!==(window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPhone/i))}catch(e){}var o=!!document.documentMode;if(n||o){if(!sessionStorage.getItem("dot_if"))return sessionStorage.setItem("dot_if","1"),void(window.location="https://dot.vu/embed?target="+encodeURIComponent(window.location.href));sessionStorage.removeItem("dot_if")}}Date.now||(Date.now=function(){return(new Date).getTime()});var a=function(e,t,n,i){!function(e){window.addEventListener("message",function(t){e(t.data)})}(function(o){var a=function(e,t,n,i){try{var o=JSON.parse(i);return o&&o.hasOwnProperty("dotId")&&o.dotId==e&&o.hasOwnProperty("pageId")&&o.pageId==t&&o.hasOwnProperty("event")&&o.event==n&&o}catch(e){return!1}}(e,t,n,o);if(a)return i(a.data)})},d=function(e,t,n,i,o,a){(a=a||parent)&&function(e,t,n){e.postMessage(n,t)}(a,i||"*",JSON.stringify({dotId:e.toString(),pageId:t,event:n,data:o}))},s=function(){var e,t,n,i,o=document.createElement("div"),a=document.createElement("div"),d=document.createElement("div");return a.className="dot-embed-loading",d.className="dot-embed-iframe-container",a.appendChild((e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),e.className="spinner",t.className="bounce1",n.className="bounce2",i.className="bounce3",e.appendChild(t),e.appendChild(n),e.appendChild(i),e)),o.appendChild(a),o.appendChild(d),o},r=function(e,t){if(null!==t&&"object"==typeof t)if(t.hasOwnProperty("dotId")&&t.hasOwnProperty("pageId")){var n=t.dotId,i=t.pageId;if(n&&i){var o=t.urlData||{},r=[];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&r.push(l+"="+encodeURIComponent(o[l]));var c=t.dotExt||"_"+n,m=t.pageExt||"_"+i,u=t.customdomainlink?t.customdomainlink:"https://dot.vu/p/"+c+"/"+m+"?"+r.join("&"),p=t.gaCrossDomainTracking,g=Date.now||function(){return(new Date).getTime()};e.appendChild(s());var h=e.getElementsByClassName("dot-embed-loading")[0],w=e.getElementsByClassName("dot-embed-iframe-container")[0],f=t.height,b=t.width,y=t.ratio||!1,v="auto"===f&&!y;y&&(f="auto");var E=function(e){return parseFloat(e)+""!=e+""},k=document.createElement("iframe");k.setAttribute("frameborder",0),k.setAttribute("width",b),k.setAttribute("height",f),E(b)||(b+="px"),E(f)||(f+="px"),k.style.width=b,k.style.height=f;k.setAttribute("allow",["camera","autoplay"].join("; ")),v&&k.setAttribute("scrolling","no"),a(n,i,"load_finished",function(){if(a(n,i,"popup_open",function(e){k.scrollIntoView()}),h.style.display="none",w.style.display="block",w.className+=" active",v){a(n,i,"height_update",function(e){e.hasOwnProperty("height")&&(w.style.height=e.height+"px",k.style.height=e.height+"px",k.setAttribute("height",e.height))});var e=0,t=function(){var t=g();e+1e3<t&&(d(n,i,"request_height","*",{},k.contentWindow||k.contentDocument),e=t)},o=function(){t(),setTimeout(o,1e3)};window.addEventListener("resize",t),o()}}),w.style.display="none",w.innerHTML="",w.appendChild(k);var I=function(e){k.setAttribute("src",e)};if("yes"===p){var x=40,C=200;!function e(){if(x>0)try{if(window.GoogleAnalyticsObject&&window[window.GoogleAnalyticsObject]){var t=window[window.GoogleAnalyticsObject].getAll()[0],n=new window.gaplugins.Linker(t);u=n.decorate(u),I(u)}else x--,setTimeout(e,C)}catch(t){x--,setTimeout(e,C)}else I(u)}()}else I(u)}}else console.log("dot-embed: Invalid arguments. Expected dotId and pageId, received: ",t);else console.log("dot-embed: Invalid iframe argument. Expected object, received: ",t)},l=".dot-embed-loading{height:80px}.dot-embed-loading .spinner{width:80px;display:block;margin:60px auto;text-align:center}.dot-embed-iframe-container{margin:0 auto;position:relative}.dot-embed-iframe-container iframe{opacity:0;visibility:hidden;transition:opacity .62s ease-in .3s}.dot-embed-iframe-container.active iframe{opacity:1;visibility:visible;transition:opacity .62s ease-in 0s,visibility 0s linear .62s}.dot-embed-loading .spinner>div{width:18px;height:18px;background-color:#595959;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.dot-embed-loading .spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.dot-embed-loading .spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}",c=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");if(m.type="text/css",m.styleSheet?m.styleSheet.cssText=l:m.appendChild(document.createTextNode(l)),c.appendChild(m),e.load&&e.load.q)for(i=0;i<e.load.q.length;i++)r.apply(null,e.load.q[i]);e.load=r}(window.dotEmbed);
     30/*! For license information please see dot-embed-3.0.js.LICENSE.txt */
     31!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define("dotEmbed",[],t):"object"===typeof exports?exports.dotEmbed=t():e.dotEmbed=t()}(this,(function(){return function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=5)}([function(e,t){function _typeof(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=_typeof=function(e){return typeof e}:e.exports=_typeof=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}e.exports=_typeof},function(e,t,n){"use strict";e.exports=n(2).polyfill()},function(e,t,n){(function(r,o){var i,a,s,u=n(0);s=function(){"use strict";function isFunction(e){return"function"===typeof e}var e=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},t=0,n=void 0,i=void 0,asap=function(e,n){d[t]=e,d[t+1]=n,2===(t+=2)&&(i?i(flush):p())},a="undefined"!==typeof window?window:void 0,s=a||{},c=s.MutationObserver||s.WebKitMutationObserver,l="undefined"===typeof self&&"undefined"!==typeof r&&"[object process]"==={}.toString.call(r),f="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function useSetTimeout(){var e=setTimeout;return function(){return e(flush,1)}}var d=new Array(1e3);function flush(){for(var e=0;e<t;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;t=0}var p=void 0;function then(e,t){var n=this,r=new this.constructor(noop);void 0===r[h]&&makePromise(r);var o=n._state;if(o){var i=arguments[o-1];asap((function(){return invokeCallback(o,r,i,n._result)}))}else subscribe(n,r,e,t);return r}function resolve$1(e){if(e&&"object"===u(e)&&e.constructor===this)return e;var t=new this(noop);return resolve(t,e),t}p=l?function(){return r.nextTick(flush)}:c?function(){var e=0,t=new c(flush),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():f?function(){var e=new MessageChannel;return e.port1.onmessage=flush,function(){return e.port2.postMessage(0)}}():void 0===a?function(){try{var e=Function("return this")().require("vertx");return"undefined"!==typeof(n=e.runOnLoop||e.runOnContext)?function(){n(flush)}:useSetTimeout()}catch(t){return useSetTimeout()}}():useSetTimeout();var h=Math.random().toString(36).substring(2);function noop(){}var m=void 0;function handleMaybeThenable(e,t,n){t.constructor===e.constructor&&n===then&&t.constructor.resolve===resolve$1?function(e,t){1===t._state?fulfill(e,t._result):2===t._state?reject(e,t._result):subscribe(t,void 0,(function(t){return resolve(e,t)}),(function(t){return reject(e,t)}))}(e,t):void 0===n?fulfill(e,t):isFunction(n)?function(e,t,n){asap((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}(n,t,(function(n){r||(r=!0,t!==n?resolve(e,n):fulfill(e,n))}),(function(t){r||(r=!0,reject(e,t))}),e._label);!r&&o&&(r=!0,reject(e,o))}),e)}(e,t,n):fulfill(e,t)}function resolve(e,t){if(e===t)reject(e,new TypeError("You cannot resolve a promise with itself"));else if(function(e){var t=u(e);return null!==e&&("object"===t||"function"===t)}(t)){var n=void 0;try{n=t.then}catch(r){return void reject(e,r)}handleMaybeThenable(e,t,n)}else fulfill(e,t)}function publishRejection(e){e._onerror&&e._onerror(e._result),publish(e)}function fulfill(e,t){e._state===m&&(e._result=t,e._state=1,0!==e._subscribers.length&&asap(publish,e))}function reject(e,t){e._state===m&&(e._state=2,e._result=t,asap(publishRejection,e))}function subscribe(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&asap(publish,e)}function publish(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?invokeCallback(n,r,o,i):o(i);e._subscribers.length=0}}function invokeCallback(e,t,n,r){var o=isFunction(n),i=void 0,a=void 0,s=!0;if(o){try{i=n(r)}catch(u){s=!1,a=u}if(t===i)return void reject(t,new TypeError("A promises callback cannot return that same promise."))}else i=r;t._state!==m||(o&&s?resolve(t,i):!1===s?reject(t,a):1===e?fulfill(t,i):2===e&&reject(t,i))}var _=0;function makePromise(e){e[h]=_++,e._state=void 0,e._result=void 0,e._subscribers=[]}var y=function(){function Enumerator(t,n){this._instanceConstructor=t,this.promise=new t(noop),this.promise[h]||makePromise(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?fulfill(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&fulfill(this.promise,this._result))):reject(this.promise,new Error("Array Methods must be provided an Array"))}return Enumerator.prototype._enumerate=function(e){for(var t=0;this._state===m&&t<e.length;t++)this._eachEntry(e[t],t)},Enumerator.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===resolve$1){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(u){a=!0,i=u}if(o===then&&e._state!==m)this._settledAt(e._state,t,e._result);else if("function"!==typeof o)this._remaining--,this._result[t]=e;else if(n===v){var s=new n(noop);a?reject(s,i):handleMaybeThenable(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},Enumerator.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===m&&(this._remaining--,2===e?reject(r,n):this._result[t]=n),0===this._remaining&&fulfill(r,this._result)},Enumerator.prototype._willSettleAt=function(e,t){var n=this;subscribe(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},Enumerator}(),v=function(){function Promise(e){this[h]=_++,this._result=this._state=void 0,this._subscribers=[],noop!==e&&("function"!==typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof Promise?function(e,t){try{t((function(t){resolve(e,t)}),(function(t){reject(e,t)}))}catch(n){reject(e,n)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return Promise.prototype.catch=function(e){return this.then(null,e)},Promise.prototype.finally=function(e){var t=this,n=t.constructor;return isFunction(e)?t.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):t.then(e,e)},Promise}();return v.prototype.then=then,v.all=function(e){return new y(this,e).promise},v.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var o=t.length,i=0;i<o;i++)n.resolve(t[i]).then(e,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},v.resolve=resolve$1,v.reject=function(e){var t=new this(noop);return reject(t,e),t},v._setScheduler=function(e){i=e},v._setAsap=function(e){asap=e},v._asap=asap,v.polyfill=function(){var e=void 0;if("undefined"!==typeof o)e=o;else if("undefined"!==typeof self)e=self;else try{e=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(r){}if("[object Promise]"===n&&!t.cast)return}e.Promise=v},v.Promise=v,v},"object"===u(t)&&"undefined"!==typeof e?e.exports=s():void 0===(a="function"===typeof(i=s)?i.call(t,n,t,e):i)||(e.exports=a)}).call(this,n(3),n(4))},function(e,t){var n,r,o=e.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(n===setTimeout)return setTimeout(e,0);if((n===defaultSetTimout||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:defaultSetTimout}catch(e){n=defaultSetTimout}try{r="function"===typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){r=defaultClearTimeout}}();var i,a=[],s=!1,u=-1;function cleanUpNextTick(){s&&i&&(s=!1,i.length?a=i.concat(a):u=-1,a.length&&drainQueue())}function drainQueue(){if(!s){var e=runTimeout(cleanUpNextTick);s=!0;for(var t=a.length;t;){for(i=a,a=[];++u<t;)i&&i[u].run();u=-1,t=a.length}i=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new Item(e,t)),1!==a.length||s||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=noop,o.addListener=noop,o.once=noop,o.off=noop,o.removeListener=noop,o.removeAllListeners=noop,o.emit=noop,o.prependListener=noop,o.prependOnceListener=noop,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r,o=n(0);r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"===("undefined"===typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t),n.d(t,"load",(function(){return i}));n(1);window.Date.now=function(){return(new window.Date).getTime()};var dotPostMessage_onMessage=function(e,t,n,r){!function(e){window.addEventListener("message",(function(t){e(t.data)}))}((function(o){var i=function(e,t,n,r){try{var o=JSON.parse(r);return o&&o.hasOwnProperty("dotId")&&o.dotId===e+""&&o.hasOwnProperty("pageId")&&o.pageId===t+""&&o.hasOwnProperty("event")&&o.event===n&&o}catch(i){return!1}}(e,t,n,o);if(i)return r(i.data)}))},dotPostMessage_sendMessage=function(e,t,n,r,o,i){(i=i||window.parent)&&function(e,t,n){e.postMessage(n,t)}(i,r||"*",JSON.stringify({dotId:e.toString(),pageId:t,event:n,data:o}))},getLoadingSpinner=function(){var e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");return e.className="spinner",t.className="bounce1",n.className="bounce2",r.className="bounce3",e.appendChild(t),e.appendChild(n),e.appendChild(r),e},getEmbedHtml=function(){var e=arguments.length&&"undefined"!==arguments[0]?arguments[0]:"on",t=document.createElement("div"),n=document.createElement("div");if(n.className="dot-embed-iframe-container","off"!==e){var r=document.createElement("div");r.className="dot-embed-loading",r.appendChild(getLoadingSpinner()),t.appendChild(r)}return t.appendChild(n),t},getUrlParameter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),n=t.exec(window.location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var r=function(){function Page(e){var t=this;_classCallCheck(this,Page),this._pagePostMessager=e,this._counter=0,this.datafields={get:function(e){return new Promise((function(n,r){var o="".concat(e,"_").concat(t._getCounter());t._pagePostMessager.on(o,(function onResponse(e){t._pagePostMessager.off(o,onResponse),e&&!e.error||r(e.error),n(e.value)})),t._pagePostMessager.send("get_data",{requestId:o,sessionDataFieldName:e})}))},set:function(e,n){t._pagePostMessager.send("set_data",{sessionDataFieldName:e,value:n})}},this.actions={run:function(e){t._pagePostMessager.send("run_action",{actionName:e})}},this.events={subscribe:function(e,n){t._pagePostMessager.on("dot_embed_event",(function(t){t.event&&t.event===e&&n(t.data)}))},unsubscribe:function(e,t){}}}return _createClass(Page,[{key:"_getCounter",value:function(){return++this._counter}}]),Page}();function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelper(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}var o=function(){function PagePostMessager(e){var t=e.iframe,n=e.dotId,r=e.pageId;_classCallCheck(this,PagePostMessager),this.iframe=t,this.dotId=n,this.pageId=r,this._listeners={}}return _createClass(PagePostMessager,[{key:"send",value:function(e,t){dotPostMessage_sendMessage(this.dotId,this.pageId,e,"*",t,this.iframe.contentWindow||this.iframe.contentDocument)}},{key:"on",value:function(e,t){var n=this;this._listeners[e]||(dotPostMessage_onMessage(this.dotId,this.pageId,e,(function(t){var r,o=_createForOfIteratorHelper(n._listeners[e]);try{for(o.s();!(r=o.n()).done;){(0,r.value)(t)}}catch(i){o.e(i)}finally{o.f()}})),this._listeners[e]=[]),this._listeners[e].push(t)}},{key:"off",value:function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==t})))}}]),PagePostMessager}(),dummy=function(){},App_load=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dummy;if(null===t||"object"!==_typeof(t))throw new Error("dot-embed: Invalid iframe argument. Expected object.");if(!t.hasOwnProperty("dotId")||!t.hasOwnProperty("pageId"))throw new Error("dot-embed: Invalid arguments. Expected dotId and pageId.");var i=t.dotId,a=t.pageId;if(!i||!a)throw new Error("dot-embed: Invalid arguments. Expected dotId and pageId");var s=getUrlParameter(t.datastore),u=t.datastore&&s?"/d/"+s:"",c=t.urlData||{},l=[];for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&l.push(f+"="+encodeURIComponent(c[f]));var d=t.dotExt||"_"+i,p=t.pageExt||"_"+a,h=t.dotDomain||"https://dot.vu",m=t.customdomainlink?t.customdomainlink:h+"/p/"+d+"/"+p;m+=u,m+=l.length>0?"?"+l.join("&"):"";var _=t.gaCrossDomainTracking;e.appendChild(getEmbedHtml(t.loading));var y="off"!==t.loading&&e.getElementsByClassName("dot-embed-loading")[0],v=e.getElementsByClassName("dot-embed-iframe-container")[0],b=t.height,g=t.width,w=t.ratio||!1,k="auto"===b&&!w;w&&(b="auto");var hasUnits=function(e){return parseFloat(e)+""!==e+""},T=document.createElement("iframe");T.setAttribute("frameborder",0),T.setAttribute("width",g),T.setAttribute("height",b),hasUnits(g)||(g+="px"),hasUnits(b)||(b+="px"),T.style.width=g,T.style.height=b;var j=["camera","autoplay"];T.setAttribute("allow",j.join("; ")),k&&T.setAttribute("scrolling","no");var onReady=function(){if(dotPostMessage_onMessage(i,a,"popup_open",(function(e){T.scrollIntoView()})),y&&(y.style.display="none"),v.style.display="block",v.className+=" active",k){dotPostMessage_onMessage(i,a,"height_update",(function(e){e.hasOwnProperty("height")&&(v.style.height=e.height+"px",T.style.height=e.height+"px",T.setAttribute("height",e.height))}));var e=0,requestResize=function(){var t=Date.now();e+1e3<t&&(dotPostMessage_sendMessage(i,a,"request_height","*",{},T.contentWindow||T.contentDocument),e=t)};window.addEventListener("resize",requestResize),function requestResizeIteration(){requestResize(),setTimeout(requestResizeIteration,1e3)}()}return n(new r(new o({iframe:T,dotId:i,pageId:a})))};"off"===t.loading?(v.innerHTML="",v.appendChild(T),onReady()):(dotPostMessage_onMessage(i,a,"load_finished",onReady),v.style.display="none",v.innerHTML="",v.appendChild(T));var updateIframeUrl=function(e){T.setAttribute("src",e)};if("yes"===_){var P=40,E=200;function whenGALoaded(){if(P>0)try{if(window.GoogleAnalyticsObject&&window[window.GoogleAnalyticsObject]){var e=window[window.GoogleAnalyticsObject].getAll()[0],t=new window.gaplugins.Linker(e);m=t.decorate(m),updateIframeUrl(m)}else P--,setTimeout(whenGALoaded,E)}catch(n){P--,setTimeout(whenGALoaded,E)}else updateIframeUrl(m)}whenGALoaded()}else updateIframeUrl(m)};!function(){var e,t;!function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0;t<e.length;t++)try{App_load.apply(null,e[t])}catch(n){console.warn(n)}}(null===(e=window.dotEmbed)||void 0===e||null===(t=e.load)||void 0===t?void 0:t.q),function(){var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.appendChild(document.createTextNode(".dot-embed-loading{height:80px}.dot-embed-loading .spinner{width:80px;display:block;margin:60px auto;text-align:center}.dot-embed-iframe-container{margin:0 auto;position:relative}.dot-embed-iframe-container iframe{opacity:0;visibility:hidden;transition:opacity .62s ease-in .3s}.dot-embed-iframe-container.active iframe{opacity:1;visibility:visible;transition:opacity .62s ease-in 0s,visibility 0s linear .62s}.dot-embed-loading .spinner>div{width:18px;height:18px;background-color:#595959;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.dot-embed-loading .spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.dot-embed-loading .spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}")),e.appendChild(t)}()}();var i=App_load}])}));
  • dot-embed/tags/3.2.10/readme.txt

    r2562854 r2562876  
    55Tested up to: 5.3.2
    66Requires PHP: 5.6
    7 Stable tag: 3.2.9
     7Stable tag: 3.2.10
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl.html
  • dot-embed/trunk/dot-embed.php

    r2284709 r2562876  
    99as follows:
    1010<code>[dotembed url="" title="" dotext="" dotid="" pageext="" pageid="" width="" height="" ratio="" loading="" loadingcolor="" gacrossdomaintracking=""]</code>
    11 Version: 3.2.9
     11Version: 3.2.10
    1212Author: Pedro Figueiredo
    1313Author URI: http://dot.vu
     
    167167          dotExt: '<?php echo esc_attr($dotext); ?>',
    168168          pageExt: '<?php echo esc_attr($pageExt); ?>',
    169           customdomainlink: '<?php echo esc_attr($customdomainlink); ?>',
     169          customdomainlink: '<?php echo  html_entity_decode(esc_url($customdomainlink)); ?>',
    170170          height: '<?php echo esc_attr($height); ?>',
    171171          width: '<?php echo esc_attr($width); ?>',
  • dot-embed/trunk/js/dot-embed.min.js

    r2280109 r2562876  
    1 /**
    2  * dot-embed.js
    3  * A lightweight library for embedding interactive content
    4  * from https://dot.vu. It includes loading animation capability,
    5  * automatic height adjustment due to internal content varying in size.
    6  * It also includes gtm cross-domain tracking support.
    7  *
    8  * @version 2.7
    9  * @author  Pedro Figueiredo
    10  * @updated 2019-06-06
    11  * @link    https://dot.vu
    12  *
    13  * Copyright 2018 dot.vu
    14  *
    15  * Permission is hereby granted, free of charge, to any person obtaining
    16  * a copy of this software and associated documentation files (the "Software"),
    17  * to deal in the Software without restriction, including without limitation the
    18  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    19  * copies of the Software, and to permit persons to whom the Software is furnished
    20  * to do so, subject to the following conditions:
    21  *
    22  * The above copyright notice and this permission notice shall be included in
    23  * all copies or substantial portions of the Software.
    24  *
    25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    26  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
    27  * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    28  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
    29  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
    30  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     1/*!
     2 *
     3 *   @dotvu/dot-embed v3.0.1
     4 *
     5 *   A lightweight library for embedding interactive content
     6 *   from https://dot.vu. It includes loading animation capability,
     7 *   automatic height adjustment due to internal content varying in size.
     8 *   It also includes gtm cross-domain tracking support.
     9 *
     10 *   Copyright (c) Dot.vu
     11 *
     12 *   Permission is hereby granted, free of charge, to any person obtaining
     13 *   a copy of this software and associated documentation files (the "Software"),
     14 *   to deal in the Software without restriction, including without limitation the
     15 *   rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     16 *   copies of the Software, and to permit persons to whom the Software is furnished
     17 *   to do so, subject to the following conditions:
     18 *
     19 *   The above copyright notice and this permission notice shall be included in
     20 *   all copies or substantial portions of the Software.
     21 *
     22 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
     23 *   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
     24 *   PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
     25 *   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     26 *   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
     27 *   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     28 *   
    3129 */
    32 window.dotEmbedConfig=window.dotEmbedConfig||{},window.dotEmbed=window.dotEmbed||{},function(e,t){if(window.dotEmbedConfig.iframeFix&&window.sessionStorage){var n=!1;try{n=null!==(window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPhone/i))}catch(e){}var o=!!document.documentMode;if(n||o){if(!sessionStorage.getItem("dot_if"))return sessionStorage.setItem("dot_if","1"),void(window.location="https://dot.vu/embed?target="+encodeURIComponent(window.location.href));sessionStorage.removeItem("dot_if")}}Date.now||(Date.now=function(){return(new Date).getTime()});var a=function(e,t,n,i){!function(e){window.addEventListener("message",function(t){e(t.data)})}(function(o){var a=function(e,t,n,i){try{var o=JSON.parse(i);return o&&o.hasOwnProperty("dotId")&&o.dotId==e&&o.hasOwnProperty("pageId")&&o.pageId==t&&o.hasOwnProperty("event")&&o.event==n&&o}catch(e){return!1}}(e,t,n,o);if(a)return i(a.data)})},d=function(e,t,n,i,o,a){(a=a||parent)&&function(e,t,n){e.postMessage(n,t)}(a,i||"*",JSON.stringify({dotId:e.toString(),pageId:t,event:n,data:o}))},s=function(){var e,t,n,i,o=document.createElement("div"),a=document.createElement("div"),d=document.createElement("div");return a.className="dot-embed-loading",d.className="dot-embed-iframe-container",a.appendChild((e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),e.className="spinner",t.className="bounce1",n.className="bounce2",i.className="bounce3",e.appendChild(t),e.appendChild(n),e.appendChild(i),e)),o.appendChild(a),o.appendChild(d),o},r=function(e,t){if(null!==t&&"object"==typeof t)if(t.hasOwnProperty("dotId")&&t.hasOwnProperty("pageId")){var n=t.dotId,i=t.pageId;if(n&&i){var o=t.urlData||{},r=[];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&r.push(l+"="+encodeURIComponent(o[l]));var c=t.dotExt||"_"+n,m=t.pageExt||"_"+i,u=t.customdomainlink?t.customdomainlink:"https://dot.vu/p/"+c+"/"+m+"?"+r.join("&"),p=t.gaCrossDomainTracking,g=Date.now||function(){return(new Date).getTime()};e.appendChild(s());var h=e.getElementsByClassName("dot-embed-loading")[0],w=e.getElementsByClassName("dot-embed-iframe-container")[0],f=t.height,b=t.width,y=t.ratio||!1,v="auto"===f&&!y;y&&(f="auto");var E=function(e){return parseFloat(e)+""!=e+""},k=document.createElement("iframe");k.setAttribute("frameborder",0),k.setAttribute("width",b),k.setAttribute("height",f),E(b)||(b+="px"),E(f)||(f+="px"),k.style.width=b,k.style.height=f;k.setAttribute("allow",["camera","autoplay"].join("; ")),v&&k.setAttribute("scrolling","no"),a(n,i,"load_finished",function(){if(a(n,i,"popup_open",function(e){k.scrollIntoView()}),h.style.display="none",w.style.display="block",w.className+=" active",v){a(n,i,"height_update",function(e){e.hasOwnProperty("height")&&(w.style.height=e.height+"px",k.style.height=e.height+"px",k.setAttribute("height",e.height))});var e=0,t=function(){var t=g();e+1e3<t&&(d(n,i,"request_height","*",{},k.contentWindow||k.contentDocument),e=t)},o=function(){t(),setTimeout(o,1e3)};window.addEventListener("resize",t),o()}}),w.style.display="none",w.innerHTML="",w.appendChild(k);var I=function(e){k.setAttribute("src",e)};if("yes"===p){var x=40,C=200;!function e(){if(x>0)try{if(window.GoogleAnalyticsObject&&window[window.GoogleAnalyticsObject]){var t=window[window.GoogleAnalyticsObject].getAll()[0],n=new window.gaplugins.Linker(t);u=n.decorate(u),I(u)}else x--,setTimeout(e,C)}catch(t){x--,setTimeout(e,C)}else I(u)}()}else I(u)}}else console.log("dot-embed: Invalid arguments. Expected dotId and pageId, received: ",t);else console.log("dot-embed: Invalid iframe argument. Expected object, received: ",t)},l=".dot-embed-loading{height:80px}.dot-embed-loading .spinner{width:80px;display:block;margin:60px auto;text-align:center}.dot-embed-iframe-container{margin:0 auto;position:relative}.dot-embed-iframe-container iframe{opacity:0;visibility:hidden;transition:opacity .62s ease-in .3s}.dot-embed-iframe-container.active iframe{opacity:1;visibility:visible;transition:opacity .62s ease-in 0s,visibility 0s linear .62s}.dot-embed-loading .spinner>div{width:18px;height:18px;background-color:#595959;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.dot-embed-loading .spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.dot-embed-loading .spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}",c=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");if(m.type="text/css",m.styleSheet?m.styleSheet.cssText=l:m.appendChild(document.createTextNode(l)),c.appendChild(m),e.load&&e.load.q)for(i=0;i<e.load.q.length;i++)r.apply(null,e.load.q[i]);e.load=r}(window.dotEmbed);
     30/*! For license information please see dot-embed-3.0.js.LICENSE.txt */
     31!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define("dotEmbed",[],t):"object"===typeof exports?exports.dotEmbed=t():e.dotEmbed=t()}(this,(function(){return function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=5)}([function(e,t){function _typeof(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=_typeof=function(e){return typeof e}:e.exports=_typeof=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}e.exports=_typeof},function(e,t,n){"use strict";e.exports=n(2).polyfill()},function(e,t,n){(function(r,o){var i,a,s,u=n(0);s=function(){"use strict";function isFunction(e){return"function"===typeof e}var e=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},t=0,n=void 0,i=void 0,asap=function(e,n){d[t]=e,d[t+1]=n,2===(t+=2)&&(i?i(flush):p())},a="undefined"!==typeof window?window:void 0,s=a||{},c=s.MutationObserver||s.WebKitMutationObserver,l="undefined"===typeof self&&"undefined"!==typeof r&&"[object process]"==={}.toString.call(r),f="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function useSetTimeout(){var e=setTimeout;return function(){return e(flush,1)}}var d=new Array(1e3);function flush(){for(var e=0;e<t;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;t=0}var p=void 0;function then(e,t){var n=this,r=new this.constructor(noop);void 0===r[h]&&makePromise(r);var o=n._state;if(o){var i=arguments[o-1];asap((function(){return invokeCallback(o,r,i,n._result)}))}else subscribe(n,r,e,t);return r}function resolve$1(e){if(e&&"object"===u(e)&&e.constructor===this)return e;var t=new this(noop);return resolve(t,e),t}p=l?function(){return r.nextTick(flush)}:c?function(){var e=0,t=new c(flush),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():f?function(){var e=new MessageChannel;return e.port1.onmessage=flush,function(){return e.port2.postMessage(0)}}():void 0===a?function(){try{var e=Function("return this")().require("vertx");return"undefined"!==typeof(n=e.runOnLoop||e.runOnContext)?function(){n(flush)}:useSetTimeout()}catch(t){return useSetTimeout()}}():useSetTimeout();var h=Math.random().toString(36).substring(2);function noop(){}var m=void 0;function handleMaybeThenable(e,t,n){t.constructor===e.constructor&&n===then&&t.constructor.resolve===resolve$1?function(e,t){1===t._state?fulfill(e,t._result):2===t._state?reject(e,t._result):subscribe(t,void 0,(function(t){return resolve(e,t)}),(function(t){return reject(e,t)}))}(e,t):void 0===n?fulfill(e,t):isFunction(n)?function(e,t,n){asap((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}(n,t,(function(n){r||(r=!0,t!==n?resolve(e,n):fulfill(e,n))}),(function(t){r||(r=!0,reject(e,t))}),e._label);!r&&o&&(r=!0,reject(e,o))}),e)}(e,t,n):fulfill(e,t)}function resolve(e,t){if(e===t)reject(e,new TypeError("You cannot resolve a promise with itself"));else if(function(e){var t=u(e);return null!==e&&("object"===t||"function"===t)}(t)){var n=void 0;try{n=t.then}catch(r){return void reject(e,r)}handleMaybeThenable(e,t,n)}else fulfill(e,t)}function publishRejection(e){e._onerror&&e._onerror(e._result),publish(e)}function fulfill(e,t){e._state===m&&(e._result=t,e._state=1,0!==e._subscribers.length&&asap(publish,e))}function reject(e,t){e._state===m&&(e._state=2,e._result=t,asap(publishRejection,e))}function subscribe(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&asap(publish,e)}function publish(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?invokeCallback(n,r,o,i):o(i);e._subscribers.length=0}}function invokeCallback(e,t,n,r){var o=isFunction(n),i=void 0,a=void 0,s=!0;if(o){try{i=n(r)}catch(u){s=!1,a=u}if(t===i)return void reject(t,new TypeError("A promises callback cannot return that same promise."))}else i=r;t._state!==m||(o&&s?resolve(t,i):!1===s?reject(t,a):1===e?fulfill(t,i):2===e&&reject(t,i))}var _=0;function makePromise(e){e[h]=_++,e._state=void 0,e._result=void 0,e._subscribers=[]}var y=function(){function Enumerator(t,n){this._instanceConstructor=t,this.promise=new t(noop),this.promise[h]||makePromise(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?fulfill(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&fulfill(this.promise,this._result))):reject(this.promise,new Error("Array Methods must be provided an Array"))}return Enumerator.prototype._enumerate=function(e){for(var t=0;this._state===m&&t<e.length;t++)this._eachEntry(e[t],t)},Enumerator.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===resolve$1){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(u){a=!0,i=u}if(o===then&&e._state!==m)this._settledAt(e._state,t,e._result);else if("function"!==typeof o)this._remaining--,this._result[t]=e;else if(n===v){var s=new n(noop);a?reject(s,i):handleMaybeThenable(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},Enumerator.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===m&&(this._remaining--,2===e?reject(r,n):this._result[t]=n),0===this._remaining&&fulfill(r,this._result)},Enumerator.prototype._willSettleAt=function(e,t){var n=this;subscribe(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},Enumerator}(),v=function(){function Promise(e){this[h]=_++,this._result=this._state=void 0,this._subscribers=[],noop!==e&&("function"!==typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof Promise?function(e,t){try{t((function(t){resolve(e,t)}),(function(t){reject(e,t)}))}catch(n){reject(e,n)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return Promise.prototype.catch=function(e){return this.then(null,e)},Promise.prototype.finally=function(e){var t=this,n=t.constructor;return isFunction(e)?t.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):t.then(e,e)},Promise}();return v.prototype.then=then,v.all=function(e){return new y(this,e).promise},v.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var o=t.length,i=0;i<o;i++)n.resolve(t[i]).then(e,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},v.resolve=resolve$1,v.reject=function(e){var t=new this(noop);return reject(t,e),t},v._setScheduler=function(e){i=e},v._setAsap=function(e){asap=e},v._asap=asap,v.polyfill=function(){var e=void 0;if("undefined"!==typeof o)e=o;else if("undefined"!==typeof self)e=self;else try{e=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(r){}if("[object Promise]"===n&&!t.cast)return}e.Promise=v},v.Promise=v,v},"object"===u(t)&&"undefined"!==typeof e?e.exports=s():void 0===(a="function"===typeof(i=s)?i.call(t,n,t,e):i)||(e.exports=a)}).call(this,n(3),n(4))},function(e,t){var n,r,o=e.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(n===setTimeout)return setTimeout(e,0);if((n===defaultSetTimout||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:defaultSetTimout}catch(e){n=defaultSetTimout}try{r="function"===typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){r=defaultClearTimeout}}();var i,a=[],s=!1,u=-1;function cleanUpNextTick(){s&&i&&(s=!1,i.length?a=i.concat(a):u=-1,a.length&&drainQueue())}function drainQueue(){if(!s){var e=runTimeout(cleanUpNextTick);s=!0;for(var t=a.length;t;){for(i=a,a=[];++u<t;)i&&i[u].run();u=-1,t=a.length}i=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new Item(e,t)),1!==a.length||s||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=noop,o.addListener=noop,o.once=noop,o.off=noop,o.removeListener=noop,o.removeAllListeners=noop,o.emit=noop,o.prependListener=noop,o.prependOnceListener=noop,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r,o=n(0);r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"===("undefined"===typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t),n.d(t,"load",(function(){return i}));n(1);window.Date.now=function(){return(new window.Date).getTime()};var dotPostMessage_onMessage=function(e,t,n,r){!function(e){window.addEventListener("message",(function(t){e(t.data)}))}((function(o){var i=function(e,t,n,r){try{var o=JSON.parse(r);return o&&o.hasOwnProperty("dotId")&&o.dotId===e+""&&o.hasOwnProperty("pageId")&&o.pageId===t+""&&o.hasOwnProperty("event")&&o.event===n&&o}catch(i){return!1}}(e,t,n,o);if(i)return r(i.data)}))},dotPostMessage_sendMessage=function(e,t,n,r,o,i){(i=i||window.parent)&&function(e,t,n){e.postMessage(n,t)}(i,r||"*",JSON.stringify({dotId:e.toString(),pageId:t,event:n,data:o}))},getLoadingSpinner=function(){var e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");return e.className="spinner",t.className="bounce1",n.className="bounce2",r.className="bounce3",e.appendChild(t),e.appendChild(n),e.appendChild(r),e},getEmbedHtml=function(){var e=arguments.length&&"undefined"!==arguments[0]?arguments[0]:"on",t=document.createElement("div"),n=document.createElement("div");if(n.className="dot-embed-iframe-container","off"!==e){var r=document.createElement("div");r.className="dot-embed-loading",r.appendChild(getLoadingSpinner()),t.appendChild(r)}return t.appendChild(n),t},getUrlParameter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),n=t.exec(window.location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var r=function(){function Page(e){var t=this;_classCallCheck(this,Page),this._pagePostMessager=e,this._counter=0,this.datafields={get:function(e){return new Promise((function(n,r){var o="".concat(e,"_").concat(t._getCounter());t._pagePostMessager.on(o,(function onResponse(e){t._pagePostMessager.off(o,onResponse),e&&!e.error||r(e.error),n(e.value)})),t._pagePostMessager.send("get_data",{requestId:o,sessionDataFieldName:e})}))},set:function(e,n){t._pagePostMessager.send("set_data",{sessionDataFieldName:e,value:n})}},this.actions={run:function(e){t._pagePostMessager.send("run_action",{actionName:e})}},this.events={subscribe:function(e,n){t._pagePostMessager.on("dot_embed_event",(function(t){t.event&&t.event===e&&n(t.data)}))},unsubscribe:function(e,t){}}}return _createClass(Page,[{key:"_getCounter",value:function(){return++this._counter}}]),Page}();function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelper(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}var o=function(){function PagePostMessager(e){var t=e.iframe,n=e.dotId,r=e.pageId;_classCallCheck(this,PagePostMessager),this.iframe=t,this.dotId=n,this.pageId=r,this._listeners={}}return _createClass(PagePostMessager,[{key:"send",value:function(e,t){dotPostMessage_sendMessage(this.dotId,this.pageId,e,"*",t,this.iframe.contentWindow||this.iframe.contentDocument)}},{key:"on",value:function(e,t){var n=this;this._listeners[e]||(dotPostMessage_onMessage(this.dotId,this.pageId,e,(function(t){var r,o=_createForOfIteratorHelper(n._listeners[e]);try{for(o.s();!(r=o.n()).done;){(0,r.value)(t)}}catch(i){o.e(i)}finally{o.f()}})),this._listeners[e]=[]),this._listeners[e].push(t)}},{key:"off",value:function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==t})))}}]),PagePostMessager}(),dummy=function(){},App_load=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dummy;if(null===t||"object"!==_typeof(t))throw new Error("dot-embed: Invalid iframe argument. Expected object.");if(!t.hasOwnProperty("dotId")||!t.hasOwnProperty("pageId"))throw new Error("dot-embed: Invalid arguments. Expected dotId and pageId.");var i=t.dotId,a=t.pageId;if(!i||!a)throw new Error("dot-embed: Invalid arguments. Expected dotId and pageId");var s=getUrlParameter(t.datastore),u=t.datastore&&s?"/d/"+s:"",c=t.urlData||{},l=[];for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&l.push(f+"="+encodeURIComponent(c[f]));var d=t.dotExt||"_"+i,p=t.pageExt||"_"+a,h=t.dotDomain||"https://dot.vu",m=t.customdomainlink?t.customdomainlink:h+"/p/"+d+"/"+p;m+=u,m+=l.length>0?"?"+l.join("&"):"";var _=t.gaCrossDomainTracking;e.appendChild(getEmbedHtml(t.loading));var y="off"!==t.loading&&e.getElementsByClassName("dot-embed-loading")[0],v=e.getElementsByClassName("dot-embed-iframe-container")[0],b=t.height,g=t.width,w=t.ratio||!1,k="auto"===b&&!w;w&&(b="auto");var hasUnits=function(e){return parseFloat(e)+""!==e+""},T=document.createElement("iframe");T.setAttribute("frameborder",0),T.setAttribute("width",g),T.setAttribute("height",b),hasUnits(g)||(g+="px"),hasUnits(b)||(b+="px"),T.style.width=g,T.style.height=b;var j=["camera","autoplay"];T.setAttribute("allow",j.join("; ")),k&&T.setAttribute("scrolling","no");var onReady=function(){if(dotPostMessage_onMessage(i,a,"popup_open",(function(e){T.scrollIntoView()})),y&&(y.style.display="none"),v.style.display="block",v.className+=" active",k){dotPostMessage_onMessage(i,a,"height_update",(function(e){e.hasOwnProperty("height")&&(v.style.height=e.height+"px",T.style.height=e.height+"px",T.setAttribute("height",e.height))}));var e=0,requestResize=function(){var t=Date.now();e+1e3<t&&(dotPostMessage_sendMessage(i,a,"request_height","*",{},T.contentWindow||T.contentDocument),e=t)};window.addEventListener("resize",requestResize),function requestResizeIteration(){requestResize(),setTimeout(requestResizeIteration,1e3)}()}return n(new r(new o({iframe:T,dotId:i,pageId:a})))};"off"===t.loading?(v.innerHTML="",v.appendChild(T),onReady()):(dotPostMessage_onMessage(i,a,"load_finished",onReady),v.style.display="none",v.innerHTML="",v.appendChild(T));var updateIframeUrl=function(e){T.setAttribute("src",e)};if("yes"===_){var P=40,E=200;function whenGALoaded(){if(P>0)try{if(window.GoogleAnalyticsObject&&window[window.GoogleAnalyticsObject]){var e=window[window.GoogleAnalyticsObject].getAll()[0],t=new window.gaplugins.Linker(e);m=t.decorate(m),updateIframeUrl(m)}else P--,setTimeout(whenGALoaded,E)}catch(n){P--,setTimeout(whenGALoaded,E)}else updateIframeUrl(m)}whenGALoaded()}else updateIframeUrl(m)};!function(){var e,t;!function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0;t<e.length;t++)try{App_load.apply(null,e[t])}catch(n){console.warn(n)}}(null===(e=window.dotEmbed)||void 0===e||null===(t=e.load)||void 0===t?void 0:t.q),function(){var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.appendChild(document.createTextNode(".dot-embed-loading{height:80px}.dot-embed-loading .spinner{width:80px;display:block;margin:60px auto;text-align:center}.dot-embed-iframe-container{margin:0 auto;position:relative}.dot-embed-iframe-container iframe{opacity:0;visibility:hidden;transition:opacity .62s ease-in .3s}.dot-embed-iframe-container.active iframe{opacity:1;visibility:visible;transition:opacity .62s ease-in 0s,visibility 0s linear .62s}.dot-embed-loading .spinner>div{width:18px;height:18px;background-color:#595959;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.dot-embed-loading .spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.dot-embed-loading .spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}")),e.appendChild(t)}()}();var i=App_load}])}));
  • dot-embed/trunk/readme.txt

    r2284709 r2562876  
    55Tested up to: 5.3.2
    66Requires PHP: 5.6
    7 Stable tag: 3.2.9
     7Stable tag: 3.2.10
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl.html
Note: See TracChangeset for help on using the changeset viewer.