+++ /dev/null
-"use strict";function config(n){n.html5Mode(!0)}function IndexController(n,e,o,t,i){function l(n){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:n.recordId}})}function a(n,o){e.parent.postMessage({id:s.lightning?null:"cti_widget_window",className:s.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:n}},"*")}var c,s=this;console.log("$location",t.search()),s.phone="",s.inCall=!1,s.lightning=t.search().mode&&"lightning"===t.search().mode.toLowerCase(),s.callbacks={},s.compose=function(n){s.phone=s.phone.concat(n)},s.remove=function(){s.phone=s.phone.substring(0,s.phone.length-1)},s.hangup=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!1},a("http://localhost:9888/api/hangup",n)},s.dial=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!0},a("http://localhost:9888/api/originate/"+s.phone,n)},s.keepalive=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.id=e.id,s.displayName=e.displayName,s.internal=e.internal,s.online=!0,c||s.host&&s.id&&(c=io(s.host,{query:{id:s.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",l),c&&c.disconnected&&c.connect()}else s.online=!1},a("http://localhost:9888/api/agent",n)},s.checkStatus=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.inCall=!!e.length}else s.inCall=!1},console.log("checkStatus"),a("http://localhost:9888/api/calls",n)},angular.element(document.createElement("base")).href=window.location.pathname,i.loadScript(s.lightning?"js/salesforce/lightning.js":"js/salesforce/interaction.js").then(function(){console.log("Script loaded succesfully"),s.lightning?sforce.opencti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}):sforce.interaction.cti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}),s.lightning?sforce.opencti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}):sforce.interaction.cti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}),s.lightning?sforce.opencti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}}):sforce.interaction.cti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}})}).catch(function(n){console.error(n)}),o(s.keepalive,2e3),o(s.checkStatus,2e3),e.addEventListener("message",function(e){var o=e.data;s.callbacks[o.uniqueid]&&(s.callbacks[o.uniqueid](o),delete s.callbacks[o.uniqueid],n.$apply())},!1)}config.$inject=["$locationProvider"],IndexController.$inject=["$scope","$window","$interval","$location","angularLoad"];var motion=angular.module("motion",["ngMaterial","angularLoad"]);motion.config(config),motion.controller("IndexController",IndexController);
\ No newline at end of file
--- /dev/null
+"use strict";function config(n){n.html5Mode(!0)}function IndexController(n,e,o,t,i){function l(n){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:n.recordId}})}function a(n,o){e.parent.postMessage({id:s.lightning?null:"ssc_widget_SoftphoneIframe",className:s.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:n}},"*")}var c,s=this;console.log("$location",t.search()),s.phone="",s.inCall=!1,s.lightning=t.search().mode&&"lightning"===t.search().mode.toLowerCase(),s.callbacks={},s.compose=function(n){s.phone=s.phone.concat(n)},s.remove=function(){s.phone=s.phone.substring(0,s.phone.length-1)},s.hangup=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!1},a("http://localhost:9888/api/hangup",n)},s.dial=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!0},a("http://localhost:9888/api/originate/"+s.phone,n)},s.keepalive=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.id=e.id,s.displayName=e.displayName,s.internal=e.internal,s.online=!0,c||s.host&&s.id&&(c=io(s.host,{query:{id:s.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",l),c&&c.disconnected&&c.connect()}else s.online=!1},a("http://localhost:9888/api/agent",n)},s.checkStatus=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.inCall=!!e.length}else s.inCall=!1},a("http://localhost:9888/api/calls",n)},angular.element(document.createElement("base")).href=window.location.pathname,i.loadScript(s.lightning?"js/salesforce/lightning.js":"js/salesforce/interaction.js").then(function(){console.log("Script loaded succesfully"),s.lightning?sforce.opencti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}):sforce.interaction.cti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}),s.lightning?sforce.opencti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}):sforce.interaction.cti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}),s.lightning?sforce.opencti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}}):sforce.interaction.cti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}})}).catch(function(n){console.error(n)}),o(s.keepalive,2e3),o(s.checkStatus,2e3),e.addEventListener("message",function(e){var o=e.data;s.callbacks[o.uniqueid]&&(s.callbacks[o.uniqueid](o),delete s.callbacks[o.uniqueid],n.$apply())},!1)}config.$inject=["$locationProvider"],IndexController.$inject=["$scope","$window","$interval","$location","angularLoad"];var motion=angular.module("motion",["ngMaterial","angularLoad"]);motion.config(config),motion.controller("IndexController",IndexController);
\ No newline at end of file
document.write("<base href='" + window.location.pathname + "' />");
</script>
- <script src="app.8579c056.js"></script>
+ <script src="app.f2beb3be.js"></script>
</body>
</html>